Browse Source

auto commit

tags/v1.1.0
yitter 3 years ago
parent
commit
bfa1e8c5df
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      README.md

+ 1
- 1
README.md View File

@@ -150,7 +150,7 @@ QQ群:646049993
<font color="#11aaff" size="5">❄</font> <font color=blue>***WorkerIdBitLength***</font>,机器码位长,决定 WorkerId 的最大值,默认值6,取值范围 [1, 19],实际上有些语言采用 无符号ushort(uint16) 类型接收该参数,所以最大值是16,如果是采用有符号short(int16),则最大值为15。
<font color="#11aaff" size="5">❄</font> <font color=blue>***WorkerId***</font>,机器码,无默认值,必须由外部设定,最大值 2^WorkerIdBitLength-1(实际上根据语言的实现不同可能会限定在 65535 或 32767,原理同 WorkerIdBitLength 的规则)。不同机器或不同应用不能相同,本算法提供一个通过 redis 自动注册 WorkerId 的动态库,详见“Tools\AutoRegisterWorkerId”。
<font color="#11aaff" size="5">❄</font> <font color=blue>***WorkerId***</font>,机器码,无默认值,必须由外部设定,最大值 2^WorkerIdBitLength-1(实际上根据语言的实现不同可能会限定在 65535 或 32767,原理同 WorkerIdBitLength 的规则)。不同机器或不同应用实例不可相同,你可通过应用程序配置该值,也可通过调用外部服务获取值。针对自动注册WorkerId需求,本算法提供默认实现:通过 redis 自动注册 WorkerId 的动态库,详见“Tools\AutoRegisterWorkerId”。
<font color="#11aaff" size="5">❄</font> <font color=blue>***SeqBitLength***</font>,序列数位长,默认值6,取值范围 [3, 21](建议不小于4),决定每毫秒生成的 ID 个数。规则要求:WorkerIdBitLength + SeqBitLength 不超过 22。


Loading…
Cancel
Save