Package com.mongodb.event
Class ConnectionPoolListenerAdapter
- java.lang.Object
-
- com.mongodb.event.ConnectionPoolListenerAdapter
-
- All Implemented Interfaces:
ConnectionPoolListener,EventListener
public abstract class ConnectionPoolListenerAdapter extends Object implements ConnectionPoolListener
An adapter for connection pool listener implementations, for clients that want to listen for a subset of connection pool events. Extend this class to listen for connection pool events and override the methods of interest.- Since:
- 3.5
-
-
Constructor Summary
Constructors Constructor Description ConnectionPoolListenerAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnectionAdded(ConnectionAddedEvent event)Invoked when a connection is added to a pool.voidconnectionCheckedIn(ConnectionCheckedInEvent event)Invoked when a connection is checked in to a pool.voidconnectionCheckedOut(ConnectionCheckedOutEvent event)Invoked when a connection is checked out of a pool.voidconnectionPoolClosed(ConnectionPoolClosedEvent event)Invoked when a connection pool is closed.voidconnectionPoolOpened(ConnectionPoolOpenedEvent event)Invoked when a connection pool is opened.voidconnectionRemoved(ConnectionRemovedEvent event)Invoked when a connection is removed from a pool.voidwaitQueueEntered(ConnectionPoolWaitQueueEnteredEvent event)Invoked when a connection pool's wait queue is entered.voidwaitQueueExited(ConnectionPoolWaitQueueExitedEvent event)Invoked when a connection pools wait queue is exited.
-
-
-
Method Detail
-
connectionPoolOpened
public void connectionPoolOpened(ConnectionPoolOpenedEvent event)
Description copied from interface:ConnectionPoolListenerInvoked when a connection pool is opened.- Specified by:
connectionPoolOpenedin interfaceConnectionPoolListener- Parameters:
event- the event
-
connectionPoolClosed
public void connectionPoolClosed(ConnectionPoolClosedEvent event)
Description copied from interface:ConnectionPoolListenerInvoked when a connection pool is closed.- Specified by:
connectionPoolClosedin interfaceConnectionPoolListener- Parameters:
event- the event
-
connectionCheckedOut
public void connectionCheckedOut(ConnectionCheckedOutEvent event)
Description copied from interface:ConnectionPoolListenerInvoked when a connection is checked out of a pool.- Specified by:
connectionCheckedOutin interfaceConnectionPoolListener- Parameters:
event- the event
-
connectionCheckedIn
public void connectionCheckedIn(ConnectionCheckedInEvent event)
Description copied from interface:ConnectionPoolListenerInvoked when a connection is checked in to a pool.- Specified by:
connectionCheckedInin interfaceConnectionPoolListener- Parameters:
event- the event
-
waitQueueEntered
public void waitQueueEntered(ConnectionPoolWaitQueueEnteredEvent event)
Description copied from interface:ConnectionPoolListenerInvoked when a connection pool's wait queue is entered.- Specified by:
waitQueueEnteredin interfaceConnectionPoolListener- Parameters:
event- the event
-
waitQueueExited
public void waitQueueExited(ConnectionPoolWaitQueueExitedEvent event)
Description copied from interface:ConnectionPoolListenerInvoked when a connection pools wait queue is exited.- Specified by:
waitQueueExitedin interfaceConnectionPoolListener- Parameters:
event- the event
-
connectionAdded
public void connectionAdded(ConnectionAddedEvent event)
Description copied from interface:ConnectionPoolListenerInvoked when a connection is added to a pool.- Specified by:
connectionAddedin interfaceConnectionPoolListener- Parameters:
event- the event
-
connectionRemoved
public void connectionRemoved(ConnectionRemovedEvent event)
Description copied from interface:ConnectionPoolListenerInvoked when a connection is removed from a pool.- Specified by:
connectionRemovedin interfaceConnectionPoolListener- Parameters:
event- the event
-
-