Package com.mongodb.event
Interface ConnectionPoolListener
- All Superinterfaces:
EventListener
- All Known Implementing Classes:
JMXConnectionPoolListener
A listener for connection pool-related events.
- Since:
- 3.5
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Invoked when a connection is checked in to a pool.default void
Invoked when a connection is checked out of a pool.default void
Invoked when an attempt to check out a connection from a pool fails.default void
Invoked when attempting to check out a connection from a pool.default void
Invoked when a connection is removed from a pool.default void
Invoked when a connection is created.default void
Invoked when a connection pool is cleared and paused.default void
Invoked when a connection pool is closed.default void
Invoked when a connection pool is created.default void
Invoked when a connection pool is ready.default void
Invoked when a connection is ready for use.
-
Method Details
-
connectionPoolCreated
Invoked when a connection pool is created. The default implementation does nothing.- Parameters:
event
- the event- Since:
- 4.0
-
connectionPoolCleared
Invoked when a connection pool is cleared and paused. The default implementation does nothing.- Parameters:
event
- the event- Since:
- 4.0
-
connectionPoolReady
Invoked when a connection pool is ready. The default implementation does nothing.- Parameters:
event
- the event- Since:
- 4.3
-
connectionPoolClosed
Invoked when a connection pool is closed. The default implementation does nothing.- Parameters:
event
- the event
-
connectionCheckOutStarted
Invoked when attempting to check out a connection from a pool. The default implementation does nothing.- Parameters:
event
- the event- Since:
- 4.0
-
connectionCheckedOut
Invoked when a connection is checked out of a pool. The default implementation does nothing.- Parameters:
event
- the event
-
connectionCheckOutFailed
Invoked when an attempt to check out a connection from a pool fails. The default implementation does nothing.- Parameters:
event
- the event- Since:
- 4.0
-
connectionCheckedIn
Invoked when a connection is checked in to a pool. The default implementation does nothing.- Parameters:
event
- the event
-
connectionCreated
Invoked when a connection is created. The default implementation does nothing.- Parameters:
event
- the event- Since:
- 4.0
-
connectionReady
Invoked when a connection is ready for use. The default implementation does nothing.- Parameters:
event
- the event- Since:
- 4.0
-
connectionClosed
Invoked when a connection is removed from a pool. The default implementation does nothing.- Parameters:
event
- the event- Since:
- 4.0
-