Browse Source

auto commit

tags/v1.1.0
yitter 3 years ago
parent
commit
a59463e04c
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      C#.NET/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs
  2. +2
    -2
      Java/source/src/main/java/com/github/yitter/core/SnowWorkerM1.java

+ 1
- 1
C#.NET/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs View File

@@ -49,7 +49,7 @@ namespace Yitter.IdGenerator
protected readonly ushort MinSeqNumber = 0; protected readonly ushort MinSeqNumber = 0;
/// <summary> /// <summary>
/// 最大漂移次数
/// 最大漂移次数(含)
/// </summary> /// </summary>
protected readonly int TopOverCostCount = 0; protected readonly int TopOverCostCount = 0;


+ 2
- 2
Java/source/src/main/java/com/github/yitter/core/SnowWorkerM1.java View File

@@ -42,7 +42,7 @@ public class SnowWorkerM1 implements ISnowWorker {
protected final short MinSeqNumber; protected final short MinSeqNumber;
/** /**
* 最大漂移次数
* 最大漂移次数(含)
*/ */
protected final int TopOverCostCount; protected final int TopOverCostCount;
@@ -143,7 +143,7 @@ public class SnowWorkerM1 implements ISnowWorker {
_TurnBackIndex++; _TurnBackIndex++;
// 每毫秒序列数的前5位是预留位,0用于手工新值,1-4是时间回拨次序 // 每毫秒序列数的前5位是预留位,0用于手工新值,1-4是时间回拨次序
// 最多4次回拨(防止回拨重叠)
// 支持4次回拨次序(避免回拨重叠导致ID重复),可无限次回拨(次序循环使用)。
if (_TurnBackIndex > 4) { if (_TurnBackIndex > 4) {
_TurnBackIndex = 1; _TurnBackIndex = 1;
} }


Loading…
Cancel
Save