Package org.forgerock.opendj.ldap
Interface ConnectionPoolEventListener
-
- All Superinterfaces:
EventListener
public interface ConnectionPoolEventListener extends EventListener
An object that registers to be notified when a connection pool grows or shrinks.NOTE 1: Since listeners are prone to race conditions they should only be used for monitoring and alerts. Specifically, an application should not use this mechanism to deduce whether a request can be sent or not. It should send the request and hope for the best.
NOTE 2: connection pool implementations must ensure that only one event is sent at a time. Event listener implementations should not need to be thread safe unless there are (re-)used by multiple connection pools.
-
-
Field Summary
Fields Modifier and Type Field Description static ConnectionPoolEventListenerNO_OPAn event listener implementation which ignores all events.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhandlePoolGrowing(ConnectionPool connectionPool)Invoked when the connection pool is growing, i.e.voidhandlePoolShrinking(ConnectionPool connectionPool)Invoked when the connection pool is shrinking, i.e.
-
-
-
Field Detail
-
NO_OP
static final ConnectionPoolEventListener NO_OP
An event listener implementation which ignores all events.
-
-
Method Detail
-
handlePoolGrowing
void handlePoolGrowing(ConnectionPool connectionPool)
Invoked when the connection pool is growing, i.e. the number of connections in the pool is about to be increased by one.- Parameters:
connectionPool- The connection pool which is growing.
-
handlePoolShrinking
void handlePoolShrinking(ConnectionPool connectionPool)
Invoked when the connection pool is shrinking, i.e. the number of connections in the pool is about to be decreased by one.- Parameters:
connectionPool- The connection pool which is shrinking.
-
-