Package com.mongodb.event
Interface ConnectionPoolListener
- All Superinterfaces:
EventListener
- All Known Implementing Classes:
ConnectionPoolListenerAdapter
,JMXConnectionPoolListener
A listener for connection pool-related events.
- Since:
- 3.5
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Deprecated.default 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
Deprecated.PreferconnectionPoolCreated(com.mongodb.event.ConnectionPoolCreatedEvent)
Implementations should NOT implement this method at all, instead relying on the default no-op implementation.default void
Invoked when a connection pool is ready.default void
Invoked when a connection is ready for use.default void
Deprecated.PreferconnectionClosed(com.mongodb.event.ConnectionClosedEvent)
Implementations should NOT implement this method at all, instead relying on the default no-op implementation.
-
Method Details
-
connectionPoolOpened
Deprecated.PreferconnectionPoolCreated(com.mongodb.event.ConnectionPoolCreatedEvent)
Implementations should NOT implement this method at all, instead relying on the default no-op implementation. If an application implements both this method and connectionPoolCreated, the application risks double-counting events.Invoked when a connection pool is opened. The default implementation does nothing.- Parameters:
event
- the event
-
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
-
connectionAdded
Deprecated.PreferconnectionCreated(com.mongodb.event.ConnectionCreatedEvent)
Implementations should NOT implement this method at all, instead relying on the default no-op implementation. If an application implements both this method and connectionCreated, the application risks double-counting events.Invoked when a connection is added 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
-
connectionRemoved
Deprecated.PreferconnectionClosed(com.mongodb.event.ConnectionClosedEvent)
Implementations should NOT implement this method at all, instead relying on the default no-op implementation. If an application implements both this method and connectionClosed, the application risks double-counting events.Invoked when a connection is removed from a pool. The default implementation does nothing.- Parameters:
event
- the event
-
connectionClosed
Invoked when a connection is removed from a pool. The default implementation does nothing.- Parameters:
event
- the event- Since:
- 4.0
-
connectionCreated(com.mongodb.event.ConnectionCreatedEvent)
Implementations should NOT implement this method at all, instead relying on the default no-op implementation.