Class StrideTracker<D>
- java.lang.Object
-
- io.engineblock.activityapi.cyclelog.buffers.Buffer<CycleResult>
-
- io.engineblock.activityimpl.motor.StrideTracker<D>
-
- All Implemented Interfaces:
OpEvents<D>,java.lang.Comparable<Buffer<CycleResult>>
public class StrideTracker<D> extends Buffer<CycleResult> implements OpEvents<D>
-
-
Constructor Summary
Constructors Constructor Description StrideTracker(com.codahale.metrics.Timer strideServiceTimer, com.codahale.metrics.Timer strideResponseTimer, long strideWaitTime, long initialCycle, int size, Output output)
-
Method Summary
Modifier and Type Method Description protected intcompare(CycleResult one, CycleResult other)voidonFull()When a stride is complete, do house keeping.voidonOpFailure(FailedOp op)voidonOpSkipped(SkippedOp<D> op)voidonOpStarted(StartedOp op)voidonOpSuccess(SucceededOp op)voidstart()Each strideOp opTracker must be started before any ops that it tracks
-
-
-
Constructor Detail
-
StrideTracker
public StrideTracker(com.codahale.metrics.Timer strideServiceTimer, com.codahale.metrics.Timer strideResponseTimer, long strideWaitTime, long initialCycle, int size, Output output)
-
-
Method Detail
-
start
public void start()
Each strideOp opTracker must be started before any ops that it tracks
-
onOpStarted
public void onOpStarted(StartedOp op)
- Specified by:
onOpStartedin interfaceOpEvents<D>
-
onOpSuccess
public void onOpSuccess(SucceededOp op)
- Specified by:
onOpSuccessin interfaceOpEvents<D>
-
onOpFailure
public void onOpFailure(FailedOp op)
- Specified by:
onOpFailurein interfaceOpEvents<D>
-
onOpSkipped
public void onOpSkipped(SkippedOp<D> op)
- Specified by:
onOpSkippedin interfaceOpEvents<D>
-
onFull
public void onFull()
When a stride is complete, do house keeping. This effectively means when N==stride ops have been submitted to this buffer, which is tracked byBuffer.put(Object).- Overrides:
onFullin classBuffer<CycleResult>
-
compare
protected int compare(CycleResult one, CycleResult other)
- Specified by:
comparein classBuffer<CycleResult>
-
-