de.zib.scalaris.executor
Interface ScalarisOp

All Known Implementing Classes:
ScalarisChangeListOp1, ScalarisChangeListOp2, ScalarisIncrementOp1, ScalarisIncrementOp2, ScalarisListAppendRemoveOp1, ScalarisListAppendRemoveOp2, ScalarisReadOp, ScalarisWriteOp

public interface ScalarisOp

Interface for arbitrary Scalaris operations.

Since:
3.13
Version:
3.13
Author:
Nico Kruber, kruber@zib.de

Method Summary
 int doPhase(int phase, int firstOp, ResultList results, RequestList requests)
          Executes the given phase.
 String toString()
           
 int workPhases()
          Gets the number of work phases needed by this operation (not including the final result verification phase).
 

Method Detail

workPhases

int workPhases()
Gets the number of work phases needed by this operation (not including the final result verification phase).

Returns:
number of required phases

doPhase

int doPhase(int phase,
            int firstOp,
            ResultList results,
            RequestList requests)
            throws OtpErlangException,
                   UnknownException,
                   IllegalArgumentException
Executes the given phase.

Parameters:
phase - the number of the current phase
firstOp - the current operation's index in the result list
results - the results from the previous operations (may be null if there was none)
requests - the requests for the next operations (may be null if there are none, i.e. in the verification phase)
Returns:
the number of processed operations from the results list
Throws:
OtpErlangException - if an error occured verifying a result from previous operations
UnknownException - if an error occured verifying a result from previous operations
IllegalArgumentException - if the given work phase is not supported
See Also:
workPhases()

toString

String toString()
Overrides:
toString in class Object