Interface OpTracker<D>
- Type Parameters:
D-
- All Superinterfaces:
OpEvents<D>
- All Known Implementing Classes:
OpTrackerImpl
The Op Tracker is the keeper of concurrency and op states. It serves a couple
key functions during the execution of an activity.
- It provides a single control point for tracking the state of all operations for an activity.
- It provides a synchronization object for parameter updates which might affect whether new operations should block callers.
-
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()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) Methods inherited from interface io.nosqlbench.engine.api.activityapi.core.ops.fluent.opfacets.OpEvents
onOpFailure, onOpSkipped, onOpStarted, onOpSuccess
-
Method Details
-
setCycleOpFunction
The cycle op function is the function which can map a cycle number into an operation of some sort.- Parameters:
newOpFunction-
-
getMaxPendingOps
int getMaxPendingOps()The maximum pending ops determines how many ops an activity is allowed to have in flight at any one time. When- Returns:
-
setMaxPendingOps
void setMaxPendingOps(int maxPendingOps) -
isFull
boolean isFull() -
getPendingOps
int getPendingOps() -
newOp
-
awaitCompletion
boolean awaitCompletion(long timeout)
-