1
0
mirror of synced 2026-04-11 19:08:39 +08:00

auto commit

This commit is contained in:
yitter
2021-04-15 16:03:12 +08:00
parent 87f729bae3
commit ec79d825c8

View File

@@ -146,6 +146,8 @@ QQ群646049993
**WorkerId**,机器码,**最重要参数**,无默认值,必须 **全局唯一**,必须 **程序设定**缺省条件WorkerIdBitLength取默认值时最大值63理论最大值 2^WorkerIdBitLength-1不同实现语言可能会限定在 65535 或 32767原理同 WorkerIdBitLength 规则)。不同机器或不同应用实例 **不能相同**你可通过应用程序配置该值也可通过调用外部服务获取值。针对自动注册WorkerId需求本算法提供默认实现通过 redis 自动注册 WorkerId 的动态库详见“Tools\AutoRegisterWorkerId”。
特别提示:如果一台服务器部署多个独立运行的服务,需要为每个服务指定不同的 WorkerId。
***SeqBitLength***,序列数位长,**默认值6**,取值范围 [3, 21]建议不小于4决定每毫秒基础生成的ID个数。规则要求WorkerIdBitLength + SeqBitLength 不超过 22。
***MinSeqNumber***最小序列数默认值5取值范围 [5, MaxSeqNumber]每毫秒的前5个序列数对应编号0-4是保留位其中1-4是时间回拨相应预留位0是手工新值预留位。