|
Oracle® Universal Connection Pool for JDBC Java API Reference 11g Release 2 (11.2) E12826-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConnectionLabelingCallback
The callback interface for connection labeling support. Applications using the connection labeling feature must provide an implementation of this interface. <p/> The callback object is registered with the Universal Connection Pool allowing applications to configure connections based on requested labels, as well as calculating the cost of such configuration that sets the connections to the desired states. <p/> The cost(...)
method projects the cost of configuring connections considering label-matching differences. Upon a connection-borrowing request, the connection pool uses this method to select a connection with the least reconfiguration cost and returns that connection to the application. The cost is represented in the form of an integer value. <p/> The configure(...)
method is called by the connection pool on the selected connection before returning it to the application. <p/> It is an error to register more than one connection labeling callback with the connection pool. Any such attempt results in a UniversalConnectionPoolException
at the pool layer or an exception specific to the type of a Universal Connection Pool Adapter (for example, JDBC, JCA, and so forth).
UniversalConnectionPool
, PoolDataSource
Method Summary | |
---|---|
boolean |
configure(java.util.Properties requestedLabels, java.lang.Object connection) Configures the selected connection for a borrowing request before returning the connection to the application. |
int |
cost(java.util.Properties requestedLabels, java.util.Properties currentLabels) Projects the cost of configuring connections considering label-matching differences. |
Method Detail |
---|
int cost(java.util.Properties requestedLabels, java.util.Properties currentLabels)
requestedLabels
- The desired labels on a connection request.currentLabels
- The current labels associated with a connection.boolean configure(java.util.Properties requestedLabels, java.lang.Object connection)
java.sql.Connection
.requestedLabels
- The desired labels on a connection request.connection
- The connection chosen by the pool to return to the application.true
; otherwise, return false
.
|
Oracle® Universal Connection Pool for JDBC Java API Reference 11g Release 2 (11.2) E12826-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |