@Immutable public final class ConnectionId extends Object
Contains a locally created id and if available the MongoDB server created connection id
Constructor | Description |
---|---|
ConnectionId(ServerId serverId) |
Construct an instance with the given server id.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(Object o) |
|
int |
getLocalValue() |
Gets the locally created id value for the connection
|
ServerId |
getServerId() |
Gets the server id.
|
Integer |
getServerValue() |
Gets the server generated id value for the connection or null if not set.
|
int |
hashCode() |
|
String |
toString() |
|
ConnectionId |
withServerValue(int serverValue) |
Creates a new connectionId with the set server value
|
public ConnectionId(ServerId serverId)
serverId
- the server idpublic ConnectionId withServerValue(int serverValue)
serverValue
- the server valuepublic ServerId getServerId()
public int getLocalValue()
public Integer getServerValue()