Package oracle.ucp.jdbc
Interface ConnectionWithTimeToLiveTimeout
-
public interface ConnectionWithTimeToLiveTimeoutInterface supporting time-to-live connection timeout handling for JDBCjava.sql.Connections.A time-to-live connection allows a borrowed connection to remain borrowed only for a pre-determined period of time. When this period passes, this connection is reclaimed and put back into the connection pool.
The Universal Connection Pool supports the
timeToLiveConnectionTimeoutpool property and providesTimeToLiveConnectionTimeoutCallbackto allow customized handling of TTL timed-out connections.Applications use this interface along with the
timeToLiveConnectionTimeoutproperties for complete TTL-connection handling.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidregisterTimeToLiveConnectionTimeoutCallback(TimeToLiveConnectionTimeoutCallback cbk)Registers a time-to-live connection timeout callback with this connection.voidremoveTimeToLiveConnectionTimeoutCallback()Removes theTimeToLiveConnectionTimeoutCallbackobject registered with this connection, if any.
-
-
-
Method Detail
-
registerTimeToLiveConnectionTimeoutCallback
void registerTimeToLiveConnectionTimeoutCallback(TimeToLiveConnectionTimeoutCallback cbk) throws java.sql.SQLException
Registers a time-to-live connection timeout callback with this connection.- Parameters:
cbk- TheTimeToLiveConnectionTimeoutCallbackobject to be registered.- Throws:
java.sql.SQLException- If there is a callback already registered with the connection.
-
removeTimeToLiveConnectionTimeoutCallback
void removeTimeToLiveConnectionTimeoutCallback() throws java.sql.SQLExceptionRemoves theTimeToLiveConnectionTimeoutCallbackobject registered with this connection, if any.- Throws:
java.sql.SQLException- If callback removal fails.
-
-