public final class IntervalTimerSnapshot extends AbstractIntervalTimerSupplier implements Serializable
IntervalTimerSupplier
.Modifier and Type | Field and Description |
---|---|
static IntervalTimerSnapshot |
UNAVAILABLE
Constant that corresponds to a snapshot of a counter
in the
StatisticState.UNAVAILABLE state. |
Constructor and Description |
---|
IntervalTimerSnapshot(IntervalTimerSupplier source)
Create a snapshot of the given timer.
|
IntervalTimerSnapshot(StatisticState state,
long startTimeMillis,
long endTimeMillis)
Create a snapshot with the specified values
|
Modifier and Type | Method and Description |
---|---|
long |
getEndTimeMillis()
Returns the end time if finished, the current time if running, or an undefined value if never started.
|
long |
getStartTimeMillis()
This will return the start time or an undefined value if never started.
|
StatisticState |
getState()
Returns the current state of the supplier.
|
IntervalTimerSnapshot |
snapshot()
Creates a snapshot of this timer.
|
String |
toString() |
getTimeIntervalMillis
public static final IntervalTimerSnapshot UNAVAILABLE
StatisticState.UNAVAILABLE
state.public IntervalTimerSnapshot(IntervalTimerSupplier source)
source
- the timerpublic IntervalTimerSnapshot(StatisticState state, long startTimeMillis, long endTimeMillis)
state
- the state of the timerstartTimeMillis
- the start time of the timerendTimeMillis
- the end time of the timerpublic IntervalTimerSnapshot snapshot()
IntervalTimerSupplier
StatisticState.ACTIVE
snapshot
in interface IntervalTimerSupplier
snapshot
in interface StatisticSupplier
public StatisticState getState()
StatisticSupplier
getState
in interface StatisticSupplier
public long getStartTimeMillis()
IntervalTimerSupplier
getStartTimeMillis
in interface IntervalTimerSupplier
public long getEndTimeMillis()
IntervalTimerSupplier
StatisticState.ACTIVE
state, then this value will reflect the time at which
the snapshot was taken.getEndTimeMillis
in interface IntervalTimerSupplier
Copyright © 2019 Actian Corporation. All rights reserved.