public final class AccumulatedTimerSnapshot extends Object implements AccumulatedTimerSupplier, Serializable
IntervalTimerSupplier
.Modifier and Type | Field and Description |
---|---|
static AccumulatedTimerSnapshot |
UNAVAILABLE
Constant that corresponds to a snapshot of a counter
in the
StatisticState.UNAVAILABLE state. |
Constructor and Description |
---|
AccumulatedTimerSnapshot(AccumulatedTimerSupplier source)
Create a snapshot of the given timer.
|
AccumulatedTimerSnapshot(StatisticState state,
long accumulatedTimeMillis)
Create a snapshot with the specified values
|
Modifier and Type | Method and Description |
---|---|
long |
getAccumulatedTimeMillis()
The accumulated time so far.
|
StatisticState |
getState()
Returns the current state of the supplier.
|
AccumulatedTimerSnapshot |
snapshot()
Creates a snapshot of this timer.
|
String |
toString() |
public static final AccumulatedTimerSnapshot UNAVAILABLE
StatisticState.UNAVAILABLE
state.public AccumulatedTimerSnapshot(AccumulatedTimerSupplier source)
source
- the timerpublic AccumulatedTimerSnapshot(StatisticState state, long accumulatedTimeMillis)
state
- the state of the timeraccumulatedTimeMillis
- the accumulated time of the timerpublic AccumulatedTimerSnapshot snapshot()
AccumulatedTimerSupplier
StatisticState.ACTIVE
snapshot
in interface AccumulatedTimerSupplier
snapshot
in interface StatisticSupplier
public StatisticState getState()
StatisticSupplier
getState
in interface StatisticSupplier
public long getAccumulatedTimeMillis()
AccumulatedTimerSupplier
AccumulatedTimerSupplier.getAccumulatedTimeMillis()
.
This value is undefined if the timer is StatisticState.UNAVAILABLE
.getAccumulatedTimeMillis
in interface AccumulatedTimerSupplier
Copyright © 2021 Actian Corporation. All rights reserved.