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.
  • Constructor Details

    • StandardActivity

      public StandardActivity​(io.nosqlbench.engine.api.activityimpl.uniform.DriverAdapter<R,​S> adapter, io.nosqlbench.engine.api.activityimpl.ActivityDef activityDef)
  • Method Details

    • initActivity

      public void initActivity()
      Specified by:
      initActivity in interface Activity
      Overrides:
      initActivity in class SimpleActivity
    • getOpSource

      public OpSource<R> 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.