Interface OpTracker<D>
- Type Parameters:
D-
- All Superinterfaces:
OpEvents<D>
- All Known Implementing Classes:
OpTrackerImpl
public interface OpTracker<D> extends OpEvents<D>
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 Type Method Description booleanawaitCompletion(long timeout)intgetMaxPendingOps()The maximum pending ops determines how many ops an activity is allowed to have in flight at any one time.intgetPendingOps()booleanisFull()TrackedOp<D>newOp(long cycle, OpEvents<D> strideTracker)voidsetCycleOpFunction(java.util.function.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)
-