|
Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.1.2) Part Number E27170-02 |
||||||||||
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.
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. Thecost(...)
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.
The configure(...)
method is called by the connection pool
on the selected connection before returning it to the application.
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(Properties requestedLabels,
Object connection)
Configures the selected connection for a borrowing request before returning the connection to the application. |
int |
cost(Properties requestedLabels,
Properties currentLabels)
Projects the cost of configuring connections considering label-matching differences. |
Method Detail |
---|
int cost(Properties requestedLabels, Properties currentLabels)
requestedLabels
- The desired labels on a connection request.currentLabels
- The current labels associated with a connection.
boolean configure(Properties requestedLabels, 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
.
|
Copyright 1996, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.1.2) Part Number E27170-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |