java.lang.Object
com.pervasive.datarush.monitoring.AccumulatedTimerSnapshot
- All Implemented Interfaces:
AccumulatedTimerSupplier,StatisticSupplier,Serializable
public final class AccumulatedTimerSnapshot
extends Object
implements AccumulatedTimerSupplier, Serializable
A snapshot that reflects a point-in-time of a
IntervalTimerSupplier.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AccumulatedTimerSnapshotConstant that corresponds to a snapshot of a counter in theStatisticState.UNAVAILABLEstate. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a snapshot of the given timer.AccumulatedTimerSnapshot(StatisticState state, long accumulatedTimeMillis) Create a snapshot with the specified values -
Method Summary
-
Field Details
-
UNAVAILABLE
Constant that corresponds to a snapshot of a counter in theStatisticState.UNAVAILABLEstate.
-
-
Constructor Details
-
AccumulatedTimerSnapshot
Create a snapshot of the given timer.- Parameters:
source- the timer
-
AccumulatedTimerSnapshot
Create a snapshot with the specified values- Parameters:
state- the state of the timeraccumulatedTimeMillis- the accumulated time of the timer
-
-
Method Details
-
snapshot
Description copied from interface:AccumulatedTimerSupplierCreates a snapshot of this timer. If the timer is in theStatisticState.ACTIVE- Specified by:
snapshotin interfaceAccumulatedTimerSupplier- 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
-
getAccumulatedTimeMillis
public long getAccumulatedTimeMillis()Description copied from interface:AccumulatedTimerSupplierThe accumulated time so far. For aggregations, this is the sum over all partitions of the to be the sum over all partitions of the partition'sAccumulatedTimerSupplier.getAccumulatedTimeMillis(). This value is undefined if the timer isStatisticState.UNAVAILABLE.- Specified by:
getAccumulatedTimeMillisin interfaceAccumulatedTimerSupplier- Returns:
- the accumulated time in milliseconds.
-
toString
-