| 接口 | 说明 |
|---|---|
| IdGenerator |
Generate id
|
| IntValueEnum<T extends Enum<T> & IntValueEnum<T>> |
Represents int value enum type structure.
|
| RemovableTypedKeyValue<K,V> |
Removable typed dictionary key-value
|
| RemovableTypedMap<K,V> |
Removable typed for
Map |
| Startable |
Representing startable
|
| Symbol.Char | |
| Symbol.Str | |
| TimingWheel.Timing<T extends TimingWheel.Timing<T>> |
Timing of TimingWheel elements
|
| TypedKeyValue<K,V> |
Get the value with typed for dictionary key-value
|
| TypedMap<K,V> |
Get the value with typed for
Map |
| ValueEnum<V,T extends Enum<T> & ValueEnum<V,T>> |
Represents value enum type structure.
|
| 类 | 说明 |
|---|---|
| ArrayHashKey |
The class use in Object array as hash map key
Use for HashMap key
|
| DelegatedIntSpliterator<T> |
Delegated int spliterator
|
| ImmutableHashList<K extends Comparable<K>,V> |
Immutable hash map & list structure
|
| LazyLoader<T> |
Lazy loader
|
| Null |
The
Null class is representing unable instance object |
| Snowflake |
基于snowflake算法的ID生成器
BINARY(Long.MAX_VALUE )=0111111111111111111111111111111111111111111111111111111111111111
BINARY(2039-09-07 23:47:35.551)=0000000000000000000000011111111111111111111111111111111111111111
0 | 0000000000 0000000000 0000000000 0000000000 0 | 00000 | 00000 | 0000000000 00
- | ------------------timestamp------------------ | -did- | -wid- | -----seq-----
00 ~ 00:1位未使用(实际上也是作为long的符号位)
01 ~ 41:41位为毫秒级时间(能到“2039-09-07 23:47:35.551”,41位bit的最大Long值,超过会溢出)
42 ~ 46:5位datacenterId
47 ~ 51:5位workerId(并不算标识符,实际是为线程标识),
52 ~ 63:12位该毫秒内的当前毫秒内的计数
毫秒内序列 (由datacenter和机器ID作区分),并且效率较高。
|
| Symbol |
Symbol definitions.
|
| TimingWheel<T extends TimingWheel.Timing<T>> |
Timing wheel structure.
|
| ToJsonString |
Override
Object#toString() method, implemented to json string. |
Copyright © 2023. All rights reserved.