Class DefaultChannelId
java.lang.Object
io.netty.channel.DefaultChannelId
- All Implemented Interfaces:
ChannelId, Serializable, Comparable<ChannelId>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]private final intprivate static final InternalLoggerprivate Stringprivate static final byte[]private static final AtomicIntegerprivate static final intprivate static final intprivate static final intprivate static final intprivate static final longprivate Stringprivate static final int -
Constructor Summary
ConstructorsConstructorDescriptionDefaultChannelId(byte[] machineId, int processId, int sequence, long timestamp, int random) Visible for testing -
Method Summary
Modifier and TypeMethodDescriptionprivate intappendHexDumpField(StringBuilder buf, int i, int length) Returns the long yet globally unique string representation of theChannelId.Returns the short but globally non-unique string representation of theChannelId.int(package private) static intbooleaninthashCode()(package private) static intjmxPid(ClassLoader loader) static DefaultChannelIdReturns a newDefaultChannelIdinstance.private String(package private) static intprocessHandlePid(ClassLoader loader) toString()private static voidwriteInt(byte[] data, int i, int value) private static voidwriteLong(byte[] data, int i, long value)
-
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
-
data
private final byte[] data -
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() -
writeInt
private static void writeInt(byte[] data, int i, int value) -
writeLong
private static void writeLong(byte[] data, int i, long value) -
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
-
appendHexDumpField
-
hashCode
-
compareTo
- Specified by:
compareToin interfaceComparable<ChannelId>
-
equals
-
toString
-