public interface ChannelId extends Serializable, Comparable<ChannelId>
Channel
.
The identifier is generated from various sources listed in the following:
System.currentTimeMillis()
,System.nanoTime()
,The global uniqueness of the generated identifier mostly depends on the MAC address and the current process ID, which are auto-detected at the class-loading time in best-effort manner. If all attempts to acquire them fail, a warning message is logged, and random values will be used instead. Alternatively, you can specify them manually via system properties:
io.netty.machineId
- hexadecimal representation of 48 (or 64) bit integer,
optionally separated by colon or hyphen.io.netty.processId
- an integer between 0 and 65535Modifier and Type | Method and Description |
---|---|
String |
asLongText()
Returns the long yet globally unique string representation of the
ChannelId . |
String |
asShortText()
Returns the short but globally non-unique string representation of the
ChannelId . |
compareTo
Copyright © 2008–2017 The Netty Project. All rights reserved.