1
0
mirror of synced 2026-10-18 12:36:10 +08:00

auto commit

This commit is contained in:
yitter
2022-09-08 11:07:12 +08:00
parent a45b38cbf9
commit fe22bfb7e2
5 changed files with 9 additions and 8 deletions

View File

@@ -18,7 +18,7 @@ JDK 1.8+
第1步,**全局** 初始化(应用程序启动时执行一次):
```
// 创建 IdGeneratorOptions 对象,可在构造函数中输入 WorkerId:
IdGeneratorOptions options = new IdGeneratorOptions(Your_Worker_Id);
IdGeneratorOptions options = new IdGeneratorOptions(Your_Unique_Worker_Id);
// options.WorkerIdBitLength = 10; // 默认值6,限定 WorkerId 最大值为2^6-1,即默认最多支持64个节点。
// options.SeqBitLength = 6; // 默认值6,限制每毫秒生成的ID个数。若生成速度超过5万个/秒,建议加大 SeqBitLength 到 10。
// options.BaseTime = Your_Base_Time; // 如果要兼容老系统的雪花算法,此处应设置为老系统的BaseTime。