Package org.apache.cassandra.utils
Class MonotonicClock.SampledClock
- java.lang.Object
-
- org.apache.cassandra.utils.MonotonicClock.SampledClock
-
- All Implemented Interfaces:
MonotonicClock
- Enclosing interface:
- MonotonicClock
public static class MonotonicClock.SampledClock extends java.lang.Object implements MonotonicClock
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.MonotonicClock
MonotonicClock.AbstractEpochSamplingClock, MonotonicClock.Global, MonotonicClock.SampledClock, MonotonicClock.SystemClock
-
-
Constructor Summary
Constructors Constructor Description SampledClock(MonotonicClock precise)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longerror()booleanisAfter(long instant)booleanisAfter(long now, long instant)longnow()voidpauseNowSampling()voidrefreshNow()voidresumeNowSampling()MonotonicClockTranslationtranslate()
-
-
-
Constructor Detail
-
SampledClock
public SampledClock(MonotonicClock precise)
-
-
Method Detail
-
now
public long now()
- Specified by:
nowin interfaceMonotonicClock- See Also:
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.
-
error
public long error()
- Specified by:
errorin interfaceMonotonicClock- Returns:
- nanoseconds of potential error
-
translate
public MonotonicClockTranslation translate()
- Specified by:
translatein interfaceMonotonicClock
-
isAfter
public boolean isAfter(long instant)
- Specified by:
isAfterin interfaceMonotonicClock
-
isAfter
public boolean isAfter(long now, long instant)- Specified by:
isAfterin interfaceMonotonicClock
-
pauseNowSampling
public void pauseNowSampling()
-
resumeNowSampling
public void resumeNowSampling()
-
refreshNow
public void refreshNow()
-
-