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.Durations
implementation that only remembers the most recentlyadded
duration.
-
-
Field Summary
Fields Modifier and Type Field Description private AtomicReference<Stopwatch.Statistics>
stats
-
Constructor Summary
Constructors Modifier Constructor Description private
SingleDuration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Duration duration)
Stopwatch.Statistics
statistics()
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.Durations
Get the statistics for the durations in nanoseconds.- Returns:
- the statistics; never null
-
add
public void add(Duration duration)
- Specified by:
add
in classStopwatch.BaseDurations
-
-