Package org.apache.jackrabbit.oak.stats
Class Clock.Fast
- java.lang.Object
-
- java.time.Clock
-
- org.apache.jackrabbit.oak.stats.Clock
-
- org.apache.jackrabbit.oak.stats.Clock.Fast
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- Clock
public static class Clock.Fast extends Clock implements java.io.Closeable
Fast clock implementation whosegetTime()
method returns instantaneously thanks to a background task that takes care of the actual time-keeping work.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.jackrabbit.oak.stats.Clock
Clock.Fast, Clock.Virtual
-
-
Constructor Summary
Constructors Constructor Description Fast(java.util.concurrent.ScheduledExecutorService executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
long
getTime()
Returns the current time in milliseconds since the epoch.java.lang.String
toString()
-
Methods inherited from class org.apache.jackrabbit.oak.stats.Clock
getDate, getDateIncreasing, getDateMonotonic, getTimeIncreasing, getTimeMonotonic, getZone, instant, waitUntil, withZone
-
-
-
-
Method Detail
-
getTime
public long getTime()
Description copied from class:Clock
Returns the current time in milliseconds since the epoch.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-