ScalarisOpExecutor
Date: 2016-02-29

de.zib.scalaris.executor

## Class ScalarisOpExecutor

- java.lang.Object
- - de.zib.scalaris.executor.ScalarisOpExecutor

- Direct Known Subclasses:
    ScalarisSingleOpExecutor, ScalarisTxOpExecutor

      public abstract class ScalarisOpExecutor
      extends Object

  Executes multiple `ScalarisOp` operations in multiple phases only sending requests to Scalaris once per work phase.
  Since:
    3.13
  Version:
    3.13
  Author:
    Nico Kruber, kruber@zib.de

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScalarisOpExecutor()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addOp(ScalarisOp op)` Adds the given operation to be executed.
    `ArrayList<ScalarisOp>` | `getOps()` Gets the current list of operations.
    `int` | `getWorkPhases()`
    `void` | `reset()` Re-sets the executor as if created from scratch.
    `void` | `run()` Executes all operations previously added with `addOp(ScalarisOp)`.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ScalarisOpExecutor

          public ScalarisOpExecutor()

  - ### Method Detail

    - #### addOp

          public void addOp(ScalarisOp op)

      Adds the given operation to be executed.
      Parameters:
        `op` - the operation to add

    - #### reset

          public void reset()

      Re-sets the executor as if created from scratch.

    - #### run

          public void run()
                   throws OtpErlangException,
                          UnknownException

      Executes all operations previously added with `addOp(ScalarisOp)`.
      Throws:
        `OtpErlangException` - if an error occurred verifying a result from previous operations
        `UnknownException` - if an error occurred verifying a result from previous operations

    - #### getWorkPhases

          public int getWorkPhases()

      Returns:
        the workPhases

    - #### getOps

          public ArrayList<ScalarisOp> getOps()

      Gets the current list of operations. This is backed by the operations in this executor - if it is reset, the list will be empty. Create a copy of this list if it should be retained.
      Returns:
        the ops the current list of operations