public class AtomicMonotonicTimestampGenerator extends LoggingMonotonicTimestampGenerator
AbstractMonotonicTimestampGenerator
Constructor and Description |
---|
AtomicMonotonicTimestampGenerator()
Creates a new instance with a warning threshold and warning interval of one second.
|
AtomicMonotonicTimestampGenerator(long warningThreshold,
TimeUnit warningThresholdUnit,
long warningInterval,
TimeUnit warningIntervalUnit)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
long |
next()
Returns the next timestamp.
|
onDrift
computeNext
public AtomicMonotonicTimestampGenerator()
public AtomicMonotonicTimestampGenerator(long warningThreshold, TimeUnit warningThresholdUnit, long warningInterval, TimeUnit warningIntervalUnit)
warningThreshold
- how far in the future timestamps are allowed to drift before a warning is logged.warningThresholdUnit
- the unit for warningThreshold
.warningInterval
- how often the warning will be logged if timestamps keep drifting above the threshold.warningIntervalUnit
- the unit for warningIntervalUnit
.public long next()
TimestampGenerator
Long.MIN_VALUE
, it won't be
sent by the driver, letting Cassandra generate a server-side timestamp.Copyright © 2012–2017. All rights reserved.