1
0
mirror of synced 2025-11-06 03:20:55 +08:00

auto commit

This commit is contained in:
yitter
2021-06-11 10:43:44 +08:00
parent 84b0d9a243
commit 4a0a1f64b8

View File

@@ -134,6 +134,14 @@ QQ群646049993
🔵 在支持 4096 个工作节点时ID可用 1120 年不重复。
### 补充说明
❄ 默认算法每个时间戳开始生成的ID是奇数。
❄ 可以把ID右移 WorkerIdBitLength+SeqBitLength得到时间戳。
## 💎 参数设置
***WorkerIdBitLength***,机器码位长,决定 WorkerId 的最大值,**默认值6**,取值范围 [1, 19],实际上有些语言采用 无符号 ushort (uint16) 类型接收该参数所以最大值是16如果是采用 有符号 short (int16)则最大值为15。