Class StandardActivity<R extends io.nosqlbench.engine.api.activityimpl.uniform.flowtypes.Op,S>
java.lang.Object
io.nosqlbench.engine.api.activityimpl.SimpleActivity
io.nosqlbench.engine.api.activityimpl.uniform.StandardActivity<R,S>
- Type Parameters:
R- A type of runnable which wraps the operations for this type of driver.
- All Implemented Interfaces:
Activity,ActivityDefObserver,ProgressCapable,StateCapable,java.lang.Comparable<Activity>
public class StandardActivity<R extends io.nosqlbench.engine.api.activityimpl.uniform.flowtypes.Op,S> extends SimpleActivity
This is a typed activity which is expected to be come the standard
core of all new activity types. Extant NB drivers should also migrate
to this when possible.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description StandardActivity(io.nosqlbench.engine.api.activityimpl.uniform.DriverAdapter<R,S> adapter, io.nosqlbench.engine.api.activityimpl.ActivityDef activityDef) -
Method Summary
Modifier and Type Method Description java.util.function.Function<java.lang.Throwable,java.lang.String>getErrorNameMapper()When an adapter needs to identify an error uniquely for the purposes of routing it to the correct error handler, or naming it in logs, or naming metrics, override this method in your activity.OpSource<R>getOpSource()voidinitActivity()Methods inherited from class io.nosqlbench.engine.api.activityimpl.SimpleActivity
closeAutoCloseables, compareTo, createOpSequence, createOpSequenceFromCommands, createOpSourceFromCommands, getActionDispenserDelegate, getActivityController, getActivityDef, getConsoleIn, getConsoleOut, getCycleLimiter, getCycleRateLimiter, getErrorHandler, getExceptionMetrics, getInputDispenserDelegate, getInstrumentation, getMarkerDispenserDelegate, getMaxTries, getMotorDispenserDelegate, getPhaseLimiter, getPhaseRateLimiter, getProgressMeter, getResultFilterDispenserDelegate, getResultTimer, getRunState, getStartedAtMillis, getStrideLimiter, getStrideRateLimiter, onActivityDefUpdate, registerAutoCloseable, setActionDispenserDelegate, setActivityController, setConsoleOut, setCycleLimiter, setDefaultsFromOpSequence, setInputDispenserDelegate, setMotorDispenserDelegate, setOutputDispenserDelegate, setPhaseLimiter, setResultFilterDispenserDelegate, setRunState, setStrideLimiter, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.nosqlbench.engine.api.activityapi.core.Activity
getAlias, getCycleSummary, getParams, shutdownActivity
-
Constructor Details
-
Method Details
-
initActivity
public void initActivity()- Specified by:
initActivityin interfaceActivity- Overrides:
initActivityin classSimpleActivity
-
getOpSource
-
getErrorNameMapper
public final java.util.function.Function<java.lang.Throwable,java.lang.String> getErrorNameMapper()When an adapter needs to identify an error uniquely for the purposes of routing it to the correct error handler, or naming it in logs, or naming metrics, override this method in your activity.- Returns:
- A function that can reliably and safely map an instance of Throwable to a stable name.
-