Class StandardAction<A extends StandardActivity<R,?>,R extends LongFunction>

java.lang.Object
io.nosqlbench.engine.api.activityimpl.uniform.actions.StandardAction<A,R>
Type Parameters:
A - The type of activity
R - The type of operation
All Implemented Interfaces:
Action, ActivityDefObserver, SyncAction

public class StandardAction<A extends StandardActivity<R,?>,R extends LongFunction> extends Object implements SyncAction, ActivityDefObserver
This is the generified version of an Action. All driver adapters us this, as opposed to previous NB versions where it was implemented for each driver.

This allows the API to be consolidated so that the internal machinery of NB works in a very consistent and uniform way for all users and drivers.

  • Constructor Details

    • StandardAction

      public StandardAction(A activity, int slot)
  • Method Details

    • runCycle

      public int runCycle(long cycle)
      Description copied from interface: SyncAction

      Apply a work function to an input value, producing an int status code.

      The meaning of status codes is activity specific, however the values Integer.MIN_VALUE, and Integer.MAX_VALUE are reserved.
      Specified by:
      runCycle in interface SyncAction
      Parameters:
      cycle - a long input
      Returns:
      an int status
    • onActivityDefUpdate

      public void onActivityDefUpdate(ActivityDef activityDef)
      Specified by:
      onActivityDefUpdate in interface ActivityDefObserver