java.lang.Object
com.pervasive.datarush.monitoring.AbstractIntervalTimerSupplier
com.pervasive.datarush.monitoring.IntervalTimerSnapshot
- All Implemented Interfaces:
IntervalTimerSupplier,StatisticSupplier,Serializable
public final class IntervalTimerSnapshot
extends AbstractIntervalTimerSupplier
implements Serializable
A snapshot that reflects a point-in-time of a
IntervalTimerSupplier.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntervalTimerSnapshotConstant that corresponds to a snapshot of a counter in theStatisticState.UNAVAILABLEstate. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a snapshot of the given timer.IntervalTimerSnapshot(StatisticState state, long startTimeMillis, long endTimeMillis) Create a snapshot with the specified values -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the end time if finished, the current time if running, or an undefined value if never started.longThis will return the start time or an undefined value if never started.getState()Returns the current state of the supplier.snapshot()Creates a snapshot of this timer.toString()Methods inherited from class com.pervasive.datarush.monitoring.AbstractIntervalTimerSupplier
getTimeIntervalMillis
-
Field Details
-
UNAVAILABLE
Constant that corresponds to a snapshot of a counter in theStatisticState.UNAVAILABLEstate.
-
-
Constructor Details
-
IntervalTimerSnapshot
Create a snapshot of the given timer.- Parameters:
source- the timer
-
IntervalTimerSnapshot
Create a snapshot with the specified values- Parameters:
state- the state of the timerstartTimeMillis- the start time of the timerendTimeMillis- the end time of the timer
-
-
Method Details
-
snapshot
Description copied from interface:IntervalTimerSupplierCreates a snapshot of this timer. If the timer is in theStatisticState.ACTIVE- Specified by:
snapshotin interfaceIntervalTimerSupplier- Specified by:
snapshotin interfaceStatisticSupplier- Returns:
- a snapshot of this statistic.
-
getState
Description copied from interface:StatisticSupplierReturns the current state of the supplier.- Specified by:
getStatein interfaceStatisticSupplier- Returns:
- the state of the supplier
-
getStartTimeMillis
public long getStartTimeMillis()Description copied from interface:IntervalTimerSupplierThis will return the start time or an undefined value if never started.- Specified by:
getStartTimeMillisin interfaceIntervalTimerSupplier- Returns:
- the start time or an undefined value if never started.
-
getEndTimeMillis
public long getEndTimeMillis()Description copied from interface:IntervalTimerSupplierReturns the end time if finished, the current time if running, or an undefined value if never started. If this timer corresponds to a snapshot of a timer that is in theStatisticState.ACTIVEstate, then this value will reflect the time at which the snapshot was taken.- Specified by:
getEndTimeMillisin interfaceIntervalTimerSupplier- Returns:
- the end time if finished, the current time if running, or an undefined value if never started
-
toString
-