Package com.mongodb.connection
Class ConnectionId
- java.lang.Object
-
- com.mongodb.connection.ConnectionId
-
@Immutable @Deprecated(since="2021-05-27") public final class ConnectionId extends java.lang.Object
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.An immutable connection identifier of a connection to a MongoDB server.Contains a locally created id and if available the MongoDB server created connection id
- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description ConnectionId(ServerId serverId)Deprecated.Construct an instance with the given server id.ConnectionId(ServerId serverId, int localValue, java.lang.Integer serverValue)Deprecated.Construct an instance with the given serverId, localValue, and serverValue.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Deprecated.intgetLocalValue()Deprecated.Gets the locally created id value for the connectionServerIdgetServerId()Deprecated.Gets the server id.java.lang.IntegergetServerValue()Deprecated.Gets the server generated id value for the connection or null if not set.inthashCode()Deprecated.java.lang.StringtoString()Deprecated.ConnectionIdwithServerValue(int serverValue)Deprecated.Creates a new connectionId with the set server value
-
-
-
Constructor Detail
-
ConnectionId
public ConnectionId(ServerId serverId)
Deprecated.Construct an instance with the given server id.- Parameters:
serverId- the server id- Since:
- 3.8
-
ConnectionId
public ConnectionId(ServerId serverId, int localValue, java.lang.Integer serverValue)
Deprecated.Construct an instance with the given serverId, localValue, and serverValue.Useful for testing, but generally prefer
withServerValue(int)- Parameters:
serverId- the server idlocalValue- the local valueserverValue- the server value, which may be null- Since:
- 3.11
- See Also:
withServerValue(int)
-
-
Method Detail
-
withServerValue
public ConnectionId withServerValue(int serverValue)
Deprecated.Creates a new connectionId with the set server value- Parameters:
serverValue- the server value- Returns:
- the new connection id
- Since:
- 3.8
-
getServerId
public ServerId getServerId()
Deprecated.Gets the server id.- Returns:
- the server id
-
getLocalValue
public int getLocalValue()
Deprecated.Gets the locally created id value for the connection- Returns:
- the locally created id value for the connection
-
getServerValue
public java.lang.Integer getServerValue()
Deprecated.Gets the server generated id value for the connection or null if not set.- Returns:
- the server generated id value for the connection or null if not set.
-
equals
public boolean equals(java.lang.Object o)
Deprecated.- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
-