public class AtomicMonotonicTimestampGenerator extends Object
System.currentTimeMillis(), with an incrementing atomic counter to generate the sub-millisecond part.
This implementation guarantees incrementing timestamps among all client threads, provided that no more than
1000 are requested for a given clock tick (the exact granularity of of
depends on the operating system).
If that rate is exceeded, a warning is logged and the timestamps don't increment anymore until the next clock
tick. If you consistently exceed that rate, consider using
|Constructor and Description|
|Modifier and Type||Method and Description|
Returns the next timestamp.
public long next()
Long.MIN_VALUE, it won't be sent by the driver, letting Cassandra generate a server-side timestamp.
protected long computeNext(long last)
Copyright © 2012–2015. All rights reserved.