Browse Source

auto commit

tags/v1.2
yitter 3 years ago
parent
commit
4a0a1f64b8
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      README.md

+ 8
- 0
README.md 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。


Loading…
Cancel
Save