public interface ChannelId extends java.io.Serializable, java.lang.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 65535限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
asLongText()
Returns the long yet globally unique string representation of the
ChannelId . |
java.lang.String |
asShortText()
Returns the short but globally non-unique string representation of the
ChannelId . |