Class ConnectionId
- java.lang.Object
-
- org.apache.hugegraph.computer.core.network.ConnectionId
-
public class ConnectionId extends java.lang.ObjectAConnectionIdidentifies a connection to a remote connection manager by the socket address and a client index. This allows multiple connections to the same worker to be distinguished by their client index.
-
-
Constructor Summary
Constructors Constructor Description ConnectionId(java.net.InetSocketAddress address)ConnectionId(java.net.InetSocketAddress address, int clientIndex)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intclientIndex()booleanequals(java.lang.Object obj)inthashCode()static ConnectionIdparseConnectionId(java.lang.String host, int port)static ConnectionIdparseConnectionId(java.lang.String host, int port, int clientIndex)java.net.InetSocketAddresssocketAddress()java.lang.StringtoString()
-
-
-
Method Detail
-
parseConnectionId
public static ConnectionId parseConnectionId(java.lang.String host, int port)
-
parseConnectionId
public static ConnectionId parseConnectionId(java.lang.String host, int port, int clientIndex)
-
socketAddress
public java.net.InetSocketAddress socketAddress()
-
clientIndex
public int clientIndex()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-