Package org.forgerock.opendj.ldap
Interface ConnectionPoolEventListener
- All Superinterfaces:
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
FieldsModifier and TypeFieldDescriptionstatic final ConnectionPoolEventListenerAn event listener implementation which ignores all events. -
Method Summary
Modifier and TypeMethodDescriptionvoidhandlePoolGrowing(ConnectionPool connectionPool) Invoked when the connection pool is growing, i.e.voidhandlePoolShrinking(ConnectionPool connectionPool) Invoked when the connection pool is shrinking, i.e.
-
Field Details
-
NO_OP
An event listener implementation which ignores all events.
-
-
Method Details
-
handlePoolGrowing
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
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.
-