Package com.mongodb.event
Class ConnectionCheckOutFailedEvent
- java.lang.Object
-
- com.mongodb.event.ConnectionCheckOutFailedEvent
-
public final class ConnectionCheckOutFailedEvent extends Object
An event for when checking out a connection fails.- Since:
- 4.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConnectionCheckOutFailedEvent.Reason
An enumeration of the reasons checking out a connection failed
-
Constructor Summary
Constructors Constructor Description ConnectionCheckOutFailedEvent(ServerId serverId, ConnectionCheckOutFailedEvent.Reason reason)
Construct an instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectionCheckOutFailedEvent.Reason
getReason()
Gets the reason for the check out failure.ServerId
getServerId()
Gets the server idString
toString()
-
-
-
Constructor Detail
-
ConnectionCheckOutFailedEvent
public ConnectionCheckOutFailedEvent(ServerId serverId, ConnectionCheckOutFailedEvent.Reason reason)
Construct an instance- Parameters:
serverId
- the server idreason
- the reason the connection check out failed
-
-
Method Detail
-
getServerId
public ServerId getServerId()
Gets the server id- Returns:
- the server id
-
getReason
public ConnectionCheckOutFailedEvent.Reason getReason()
Gets the reason for the check out failure.- Returns:
- the reason
- Since:
- 4.3
-
-