Class DefaultChannelId

java.lang.Object
io.netty.channel.DefaultChannelId
All Implemented Interfaces:
ChannelId, Serializable, Comparable<ChannelId>

public final class DefaultChannelId extends Object implements ChannelId
The default ChannelId implementation.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • logger

      private static final InternalLogger logger
    • MACHINE_ID

      private static final byte[] MACHINE_ID
    • PROCESS_ID_LEN

      private static final int PROCESS_ID_LEN
      See Also:
    • PROCESS_ID

      private static final int PROCESS_ID
    • SEQUENCE_LEN

      private static final int SEQUENCE_LEN
      See Also:
    • TIMESTAMP_LEN

      private static final int TIMESTAMP_LEN
      See Also:
    • RANDOM_LEN

      private static final int RANDOM_LEN
      See Also:
    • nextSequence

      private static final AtomicInteger nextSequence
    • data

      private final byte[] data
    • hashCode

      private final int hashCode
    • shortValue

      private transient String shortValue
    • longValue

      private transient String longValue
  • Constructor Details

    • DefaultChannelId

      private DefaultChannelId()
  • Method Details

    • newInstance

      public static DefaultChannelId newInstance()
      Returns a new DefaultChannelId instance.
    • processHandlePid

      static int processHandlePid(ClassLoader loader)
    • jmxPid

      static int jmxPid(ClassLoader loader)
    • defaultProcessId

      static int defaultProcessId()
    • writeInt

      private int writeInt(int i, int value)
    • writeLong

      private int writeLong(int i, long value)
    • asShortText

      public String asShortText()
      Description copied from interface: ChannelId
      Returns the short but globally non-unique string representation of the ChannelId.
      Specified by:
      asShortText in interface ChannelId
    • asLongText

      public String asLongText()
      Description copied from interface: ChannelId
      Returns the long yet globally unique string representation of the ChannelId.
      Specified by:
      asLongText in interface ChannelId
    • newLongValue

      private String newLongValue()
    • appendHexDumpField

      private int appendHexDumpField(StringBuilder buf, int i, int length)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(ChannelId o)
      Specified by:
      compareTo in interface Comparable<ChannelId>
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object