Class OpTrackerImpl<D>
java.lang.Object
io.nosqlbench.engine.api.activityapi.core.ops.fluent.OpTrackerImpl<D>
- Type Parameters:
D- The payload data type of the associated Op, based on OpImpl
- All Implemented Interfaces:
ActivityDefObserver,OpEvents<D>,OpTracker<D>
This tracker keeps track of the state of operations associated with it.
-
Constructor Summary
ConstructorsConstructorDescriptionOpTrackerImpl(Activity activity, long slot) OpTrackerImpl(String name, int slot, com.codahale.metrics.Timer cycleServiceTimer, com.codahale.metrics.Timer cycleResponseTimer, com.codahale.metrics.Counter pendingOpsCounter) -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitCompletion(long timeout) intThe maximum pending ops determines how many ops an activity is allowed to have in flight at any one time.intbooleanisFull()voidonActivityDefUpdate(ActivityDef activityDef) voidonOpFailure(FailedOp<D> op) voidonOpSkipped(SkippedOp<D> op) voidonOpStarted(StartedOp<D> op) voidonOpSuccess(SucceededOp<D> op) voidsetCycleOpFunction(LongFunction<D> newOpFunction) The cycle op function is the function which can map a cycle number into an operation of some sort.voidsetMaxPendingOps(int maxPendingOps) toString()
-
Constructor Details
-
OpTrackerImpl
-
OpTrackerImpl
public OpTrackerImpl(String name, int slot, com.codahale.metrics.Timer cycleServiceTimer, com.codahale.metrics.Timer cycleResponseTimer, com.codahale.metrics.Counter pendingOpsCounter)
-
-
Method Details
-
onOpStarted
- Specified by:
onOpStartedin interfaceOpEvents<D>
-
onOpSuccess
- Specified by:
onOpSuccessin interfaceOpEvents<D>
-
onOpSkipped
- Specified by:
onOpSkippedin interfaceOpEvents<D>
-
onOpFailure
- Specified by:
onOpFailurein interfaceOpEvents<D>
-
setMaxPendingOps
public void setMaxPendingOps(int maxPendingOps) - Specified by:
setMaxPendingOpsin interfaceOpTracker<D>
-
isFull
-
getPendingOps
public int getPendingOps()- Specified by:
getPendingOpsin interfaceOpTracker<D>
-
setCycleOpFunction
Description copied from interface:OpTrackerThe cycle op function is the function which can map a cycle number into an operation of some sort.- Specified by:
setCycleOpFunctionin interfaceOpTracker<D>- Parameters:
newOpFunction-
-
newOp
-
getMaxPendingOps
public int getMaxPendingOps()Description copied from interface:OpTrackerThe maximum pending ops determines how many ops an activity is allowed to have in flight at any one time. When- Specified by:
getMaxPendingOpsin interfaceOpTracker<D>- Returns:
-
awaitCompletion
public boolean awaitCompletion(long timeout) - Specified by:
awaitCompletionin interfaceOpTracker<D>
-
toString
-
onActivityDefUpdate
- Specified by:
onActivityDefUpdatein interfaceActivityDefObserver
-