Class BaseOpDispenser<T extends Op>
java.lang.Object
io.nosqlbench.engine.api.activityimpl.BaseOpDispenser<T>
- Type Parameters:
T- The type of operation
- All Implemented Interfaces:
OpDispenser<T>,OpResultTracker,LongFunction<T>
- Direct Known Subclasses:
StandardOpDispenser
See
OpDispenser for details on how to use this type.
Some details are tracked per op template, which aligns to the life-cycle of the op dispenser.
Thus, each op dispenser is where the stats for all related operations are kept.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BaseOpDispenser
-
-
Method Details
-
getAdapter
-
apply
The apply method in an op dispenser should do all the work of creating an operation that is executable by some other caller. The value produced by the apply method should not require additional processing if a caller wants to execute the operation multiple times, as for retries.- Specified by:
applyin interfaceLongFunction<T extends Op>- Specified by:
applyin interfaceOpDispenser<T extends Op>- Parameters:
cycle- The cycle number which serves as the seed for any generated op fields to be bound into an operation.- Returns:
-
onStart
public void onStart(long cycleValue) - Specified by:
onStartin interfaceOpResultTracker
-
onSuccess
public void onSuccess(long cycleValue, long nanoTime, long resultsize) - Specified by:
onSuccessin interfaceOpResultTracker
-
onError
- Specified by:
onErrorin interfaceOpResultTracker
-