in harry-core/src/harry/model/clock/ApproximateMonotonicClock.java [155:181]
public long nextLts()
{
long current = lts.get();
while (true)
{
if (current >= 0)
{
if (lts.compareAndSet(current, current + 1))
return current;
current = lts.get();
continue;
}
if (current == REBASE_IN_PROGRESS)
{
LockSupport.parkNanos(1);
current = lts.get();
continue;
}
if (current == DEFUNCT)
throwCounterExhaustedException();
throw new IllegalStateException("This should have been unreachable: " + current);
}
}