Package org.apache.jackrabbit.oak.stats
Class Clock.Virtual
java.lang.Object
java.time.Clock
org.apache.jackrabbit.oak.stats.Clock
org.apache.jackrabbit.oak.stats.Clock.Virtual
- All Implemented Interfaces:
InstantSource
- Enclosing class:
Clock
A virtual clock that has no connection to the actual system time.
Instead the clock maintains an internal counter that's incremented
atomically whenever the current time is requested. This guarantees
that the reported time signal is always strictly increasing.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.jackrabbit.oak.stats.Clock
Clock.Fast, Clock.Virtual -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.jackrabbit.oak.stats.Clock
getDate, getDateIncreasing, getDateMonotonic, getTimeIncreasing, getTimeMonotonic, getZone, instant, withZoneMethods inherited from class java.time.Clock
equals, fixed, hashCode, millis, offset, system, systemDefaultZone, systemUTC, tick, tickMillis, tickMinutes, tickSeconds
-
Constructor Details
-
Virtual
public Virtual()
-
-
Method Details
-
getTime
public long getTime()Description copied from class:ClockReturns the current time in milliseconds since the epoch. -
waitUntil
public void waitUntil(long timestamp) Description copied from class:ClockWaits until the given point in time is reached. The current thread is suspended until theClock.getTimeIncreasing()method returns a time that's equal or greater than the given point in time. -
toString
-