@FunctionalInterface public interface ClusterClock
TimeUnits since 1 Jan 1970 UTC. Defaults to TimeUnit.MILLISECONDS.
This is the clock used to timestamp sequenced messages for the cluster log and timers. Implementations should be efficient otherwise throughput of the cluster will be impacted due to frequency of use.
| Modifier and Type | Method and Description |
|---|---|
static TimeUnit |
map(ClusterTimeUnit clusterTimeUnit)
Map
ClusterTimeUnit to a corresponding TimeUnit. |
static ClusterTimeUnit |
map(TimeUnit timeUnit)
Map
TimeUnit to a corresponding ClusterTimeUnit. |
long |
time()
The count of
timeUnit()s since 1 Jan 1970 UTC. |
default long |
timeMicros()
Get the current time in
TimeUnit.MICROSECONDS. |
default long |
timeMillis()
Get the current time in
TimeUnit.MILLISECONDS. |
default long |
timeNanos()
Get the current time in
TimeUnit.NANOSECONDS. |
default TimeUnit |
timeUnit()
The unit of time returned from the
time() method. |
default TimeUnit timeUnit()
time() method.time() method.long time()
timeUnit()s since 1 Jan 1970 UTC.timeUnit()s since 1 Jan 1970 UTC.default long timeMillis()
TimeUnit.MILLISECONDS.TimeUnit.MILLISECONDS.default long timeMicros()
TimeUnit.MICROSECONDS.TimeUnit.MICROSECONDS.default long timeNanos()
TimeUnit.NANOSECONDS.TimeUnit.NANOSECONDS.static ClusterTimeUnit map(TimeUnit timeUnit)
TimeUnit to a corresponding ClusterTimeUnit.timeUnit - to map to a corresponding ClusterTimeUnit.ClusterTimeUnit.static TimeUnit map(ClusterTimeUnit clusterTimeUnit)
ClusterTimeUnit to a corresponding TimeUnit.clusterTimeUnit - to map to a corresponding TimeUnit.TimeUnit, if ClusterTimeUnit.NULL_VAL is passed then defaults
to TimeUnit.MILLISECONDS.Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.