public interface ConnectionWithTimeToLiveTimeout
java.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
timeToLiveConnectionTimeout
pool
property and provides TimeToLiveConnectionTimeoutCallback
to
allow customized handling of TTL timed-out connections.
Applications use this interface along with the
timeToLiveConnectionTimeout
properties for complete TTL-connection handling.Modifier and Type | Method and Description |
---|---|
void |
registerTimeToLiveConnectionTimeoutCallback(TimeToLiveConnectionTimeoutCallback cbk)
Registers a time-to-live connection timeout callback with this connection.
|
void |
removeTimeToLiveConnectionTimeoutCallback()
Removes the
TimeToLiveConnectionTimeoutCallback object
registered with this connection, if any. |
void registerTimeToLiveConnectionTimeoutCallback(TimeToLiveConnectionTimeoutCallback cbk) throws SQLException
cbk
- The TimeToLiveConnectionTimeoutCallback
object to
be registered.SQLException
- If there is a callback already
registered with the connection.void removeTimeToLiveConnectionTimeoutCallback() throws SQLException
TimeToLiveConnectionTimeoutCallback
object
registered with this connection, if any.SQLException
- If callback removal fails.
Copyright © 2008, 2017, Oracle. All rights reserved.