public final class ServerHeartbeatSucceededEvent
extends java.lang.Object
Constructor and Description |
---|
ServerHeartbeatSucceededEvent(ConnectionId connectionId,
BsonDocument reply,
long elapsedTimeNanos)
Construct an instance.
|
Modifier and Type | Method and Description |
---|---|
ConnectionId |
getConnectionId()
Gets the connectionId.
|
long |
getElapsedTime(java.util.concurrent.TimeUnit timeUnit)
Gets the elapsed time in the given time unit.
|
BsonDocument |
getReply()
Gets the reply to the isMaster command executed for this heartbeat.
|
java.lang.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(java.util.concurrent.TimeUnit timeUnit)
timeUnit
- the non-null timeUnitpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved