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() |
getTimeIntervalMillispublic 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()
IntervalTimerSupplierStatisticState.ACTIVEsnapshot in interface IntervalTimerSuppliersnapshot in interface StatisticSupplierpublic StatisticState getState()
StatisticSuppliergetState in interface StatisticSupplierpublic long getStartTimeMillis()
IntervalTimerSuppliergetStartTimeMillis in interface IntervalTimerSupplierpublic long getEndTimeMillis()
IntervalTimerSupplierStatisticState.ACTIVE state, then this value will reflect the time at which
the snapshot was taken.getEndTimeMillis in interface IntervalTimerSupplierCopyright © 2019 Actian Corporation. All rights reserved.