Package com.mongodb.event
Class ConnectionCheckOutFailedEvent
java.lang.Object
com.mongodb.event.ConnectionCheckOutFailedEvent
An event for when checking out a connection fails.
- Since:
- 4.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
An enumeration of the reasons checking out a connection failed -
Constructor Summary
ConstructorDescriptionConnectionCheckOutFailedEvent
(ServerId serverId, long operationId, ConnectionCheckOutFailedEvent.Reason reason) Construct an instanceConnectionCheckOutFailedEvent
(ServerId serverId, ConnectionCheckOutFailedEvent.Reason reason) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionlong
Gets the operation identifierGets the reason for the check out failure.Gets the server idtoString()
-
Constructor Details
-
ConnectionCheckOutFailedEvent
public ConnectionCheckOutFailedEvent(ServerId serverId, long operationId, ConnectionCheckOutFailedEvent.Reason reason) Construct an instance- Parameters:
serverId
- the server idoperationId
- the operation idreason
- the reason the connection check out failed- Since:
- 4.10
-
ConnectionCheckOutFailedEvent
@Deprecated public ConnectionCheckOutFailedEvent(ServerId serverId, ConnectionCheckOutFailedEvent.Reason reason) Deprecated.Construct an instance- Parameters:
serverId
- the server idreason
- the reason the connection check out failed
-
-
Method Details
-
getServerId
Gets the server id- Returns:
- the server id
-
getOperationId
public long getOperationId()Gets the operation identifier- Returns:
- the operation identifier
- Since:
- 4.10
-
getReason
Gets the reason for the check out failure.- Returns:
- the reason
- Since:
- 4.3
-
toString
-
ConnectionCheckOutFailedEvent(ServerId, long, Reason)