public final class ServerHeartbeatSucceededEvent extends Object
Constructor | Description |
---|---|
ServerHeartbeatSucceededEvent(ConnectionId connectionId,
BsonDocument reply,
long elapsedTimeNanos) |
Construct an instance.
|
Modifier and Type | Method | Description |
---|---|---|
ConnectionId |
getConnectionId() |
Gets the connectionId.
|
long |
getElapsedTime(TimeUnit timeUnit) |
Gets the elapsed time in the given time unit.
|
BsonDocument |
getReply() |
Gets the reply to the isMaster command executed for this heartbeat.
|
String |
toString() |
public ServerHeartbeatSucceededEvent(ConnectionId connectionId, BsonDocument reply, long elapsedTimeNanos)
connectionId
- the non-null connectionIdreply
- the non-null reply to an isMaster commandelapsedTimeNanos
- the non-negative elapsed time in nanosecondspublic ConnectionId getConnectionId()
public BsonDocument getReply()
public long getElapsedTime(TimeUnit timeUnit)
timeUnit
- the non-null timeUnit