Class DefaultChannelId
java.lang.Object
io.netty.channel.DefaultChannelId
- All Implemented Interfaces:
ChannelId, Serializable, Comparable<ChannelId>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate static final char[]private static final InternalLoggerprivate Stringprivate static final byte[]private final byte[]private static final AtomicIntegerprivate static final intprivate static final intprivate final intprivate final intprivate static final intprivate final intprivate static final intprivate static final longprivate Stringprivate final longprivate static final int -
Constructor Summary
ConstructorsConstructorDescriptionDefaultChannelId(byte[] machineId, int processId, int sequence, long timestamp, int random) Visible for testing -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidappendHexBytes(StringBuilder buf, byte[] bytes) private static voidappendHexInt(StringBuilder buf, int value) private static voidappendHexLong(StringBuilder buf, long value) Returns the long yet globally unique string representation of theChannelId.Returns the short but globally non-unique string representation of theChannelId.private static intcompareBytes(byte[] a, byte[] b) intprivate int(package private) static intbooleaninthashCode()(package private) static intjmxPid(ClassLoader loader) static DefaultChannelIdReturns a newDefaultChannelIdinstance.private String(package private) static intprocessHandlePid(ClassLoader loader) toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
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
-
HEX_CHARS
private static final char[] HEX_CHARS -
machineId
private final byte[] machineId -
processId
private final int processId -
sequence
private final int sequence -
timestamp
private final long timestamp -
random
private final int random -
hashCode
private final int hashCode -
shortValue
-
longValue
-
-
Constructor Details
-
DefaultChannelId
DefaultChannelId(byte[] machineId, int processId, int sequence, long timestamp, int random) Visible for testing
-
-
Method Details
-
newInstance
Returns a newDefaultChannelIdinstance. -
processHandlePid
-
jmxPid
-
defaultProcessId
static int defaultProcessId() -
computeHashCode
private int computeHashCode() -
asShortText
Description copied from interface:ChannelIdReturns the short but globally non-unique string representation of theChannelId.- Specified by:
asShortTextin interfaceChannelId
-
asLongText
Description copied from interface:ChannelIdReturns the long yet globally unique string representation of theChannelId.- Specified by:
asLongTextin interfaceChannelId
-
newLongValue
-
appendHexBytes
-
appendHexInt
-
appendHexLong
-
hashCode
-
compareTo
- Specified by:
compareToin interfaceComparable<ChannelId>
-
compareBytes
private static int compareBytes(byte[] a, byte[] b) -
equals
-
toString
-