Class ConnectionKey


  • public class ConnectionKey
    extends Object
    Connection Key.
    • Constructor Detail

      • ConnectionKey

        public ConnectionKey​(@NotNull
                             @NotNull UUID nodeId,
                             int idx)
        Parameters:
        nodeId - Node ID. Should be not null.
        idx - Connection index.
      • ConnectionKey

        public ConnectionKey​(@NotNull
                             @NotNull UUID nodeId,
                             int idx,
                             long connCnt)
        Creates ConnectionKey with false value of dummy flag.
        Parameters:
        nodeId - Node ID. Should be not null.
        idx - Connection index.
        connCnt - Connection counter (set only for incoming connections).
      • ConnectionKey

        public ConnectionKey​(@NotNull
                             @NotNull UUID nodeId,
                             int idx,
                             long connCnt,
                             boolean dummy)
        Parameters:
        nodeId - Node ID. Should be not null.
        idx - Connection index.
        connCnt - Connection counter (set only for incoming connections).
        dummy - Indicates that session with this ConnectionKey is temporary (for now dummy sessions are used only for Communication Failure Resolving process).
    • Method Detail

      • connectCount

        public long connectCount()
        Returns:
        Connection counter.
      • nodeId

        public UUID nodeId()
        Returns:
        Node ID.
      • connectionIndex

        public int connectionIndex()
        Returns:
        Connection index.
      • dummy

        public boolean dummy()
        Returns:
        True if this ConnectionKey is dummy and serves temporary session.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object