Package com.mongodb.event
Class ConnectionClosedEvent
java.lang.Object
com.mongodb.event.ConnectionClosedEvent
An event for when a connection pool closes a connection.
Such a connection stops being counted towards
ConnectionPoolSettings.getMaxSize()
.- Since:
- 4.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
An enumeration of the reasons a connection could be closed -
Constructor Summary
ConstructorDescriptionConnectionClosedEvent
(ConnectionId connectionId, ConnectionClosedEvent.Reason reason) Construct an instance -
Method Summary
Modifier and TypeMethodDescriptionGets the connection idGet the reason the connection was removed.toString()
-
Constructor Details
-
ConnectionClosedEvent
Construct an instance- Parameters:
connectionId
- the connection idreason
- the reason the connection was closed
-
-
Method Details