Package io.debezium.util
Class Stopwatch.SingleDuration
- java.lang.Object
-
- io.debezium.util.Stopwatch.BaseDurations
-
- io.debezium.util.Stopwatch.SingleDuration
-
- All Implemented Interfaces:
Stopwatch.Durations
- Enclosing class:
- Stopwatch
@ThreadSafe private static final class Stopwatch.SingleDuration extends Stopwatch.BaseDurations
AStopwatch.Durationsimplementation that only remembers the most recentlyaddedduration.
-
-
Field Summary
Fields Modifier and Type Field Description private AtomicReference<Stopwatch.Statistics>stats
-
Constructor Summary
Constructors Modifier Constructor Description privateSingleDuration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Duration duration)Stopwatch.Statisticsstatistics()Get the statistics for the durations in nanoseconds.-
Methods inherited from class io.debezium.util.Stopwatch.BaseDurations
toString
-
-
-
-
Field Detail
-
stats
private final AtomicReference<Stopwatch.Statistics> stats
-
-
Method Detail
-
statistics
public Stopwatch.Statistics statistics()
Description copied from interface:Stopwatch.DurationsGet the statistics for the durations in nanoseconds.- Returns:
- the statistics; never null
-
add
public void add(Duration duration)
- Specified by:
addin classStopwatch.BaseDurations
-
-