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
- 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, millis, waitFor, waitFor, withZone
Methods inherited from class java.time.Clock
equals, fixed, hashCode, offset, system, systemDefaultZone, systemUTC, tick, tickMillis, tickMinutes, tickSeconds
-
Constructor Details
-
Virtual
public Virtual()
-
-
Method Details
-
getTime
public long getTime()Description copied from class:Clock
Returns the current time in milliseconds since the epoch.Users of this class should use
Clock.millis()
instead. This abstract method remains here for cases where this class is extended. -
waitUntil
public void waitUntil(long timestamp) Description copied from class:Clock
Waits 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
-