- 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 aIntervalTimerSupplier.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static AccumulatedTimerSnapshotUNAVAILABLEConstant that corresponds to a snapshot of a counter in theStatisticState.UNAVAILABLEstate.
-
Constructor Summary
Constructors Constructor Description AccumulatedTimerSnapshot(AccumulatedTimerSupplier source)Create a snapshot of the given timer.AccumulatedTimerSnapshot(StatisticState state, long accumulatedTimeMillis)Create a snapshot with the specified values
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetAccumulatedTimeMillis()The accumulated time so far.StatisticStategetState()Returns the current state of the supplier.AccumulatedTimerSnapshotsnapshot()Creates a snapshot of this timer.StringtoString()
-
-
-
Field Detail
-
UNAVAILABLE
public static final AccumulatedTimerSnapshot UNAVAILABLE
Constant that corresponds to a snapshot of a counter in theStatisticState.UNAVAILABLEstate.
-
-
Constructor Detail
-
AccumulatedTimerSnapshot
public AccumulatedTimerSnapshot(AccumulatedTimerSupplier source)
Create a snapshot of the given timer.- Parameters:
source- the timer
-
AccumulatedTimerSnapshot
public AccumulatedTimerSnapshot(StatisticState state, long accumulatedTimeMillis)
Create a snapshot with the specified values- Parameters:
state- the state of the timeraccumulatedTimeMillis- the accumulated time of the timer
-
-
Method Detail
-
snapshot
public AccumulatedTimerSnapshot 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
public StatisticState 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.
-
-