public interface MonotonicClock
preciseTime
for how to use a custom implementation.
Please note that Clock
wasn't used, as it would not be possible to provide an
implementation for now()
with the exact same properties of System.nanoTime()
.Modifier and Type | Interface and Description |
---|---|
static class |
MonotonicClock.AbstractEpochSamplingClock |
static class |
MonotonicClock.Defaults |
static class |
MonotonicClock.SampledClock |
static class |
MonotonicClock.SystemClock |
Modifier and Type | Field and Description |
---|---|
static MonotonicClock |
approxTime |
static MonotonicClock |
preciseTime
Static singleton object that will be instantiated by default with a system clock
implementation.
|
Modifier and Type | Method and Description |
---|---|
long |
error() |
boolean |
isAfter(long instant) |
boolean |
isAfter(long now,
long instant) |
long |
now() |
MonotonicClockTranslation |
translate() |
static final MonotonicClock preciseTime
cassandra.clock
system property to a FQCN to use a
different implementation instead.static final MonotonicClock approxTime
long now()
Provides a monotonic time that can be compared with any other such value produced by the same clock
since the application started only; these times cannot be persisted or serialized to other nodes.
Nanosecond precision.
long error()
MonotonicClockTranslation translate()
boolean isAfter(long instant)
boolean isAfter(long now, long instant)
Copyright © 2009- The Apache Software Foundation