TransactionSingleOpOperation
Date: 2016-02-29

de.zib.scalaris.operations

## Interface TransactionSingleOpOperation

- All Superinterfaces:
    Operation
  All Known Implementing Classes:
    AddDelOnListOp, AddOnNrOp, PartialReadOp, ReadOp, ReadRandomFromListOp, ReadSublistOp, TestAndSetOp, WriteOp

      public interface TransactionSingleOpOperation
      extends Operation

  An operation suitable for use in `TransactionSingleOp`.
  Since:
    3.14
  Version:
    3.18
  Author:
    Nico Kruber, kruber@zib.de

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `processResultSingle()` Processes the result set by `Operation.setResult(OtpErlangObject, boolean)` assuming that operation was committed.

    - ### Methods inherited from interface de.zib.scalaris.operations.Operation

      `getErlang, getKey, getResult, getResultCompressed, processResult, setResult`

- - ### Method Detail

    - #### processResultSingle

          Object processResultSingle()
                                     throws NotFoundException,
                                            KeyChangedException,
                                            NotANumberException,
                                            NotAListException,
                                            AbortException,
                                            EmptyListException,
                                            UnknownException

      Processes the result set by `Operation.setResult(OtpErlangObject, boolean)` assuming that operation was committed. In contrast to `Operation.processResult()` operations like `WriteOp` will throw a proper `AbortException` for their commit part instead of an `UnknownException`. Note: the created value is not cached!
      Returns:
        a (potentially) read value (may be `null`)
      Throws:
        `NotFoundException` - if the requested key does not exist
        `KeyChangedException` - if the key did not match `old_value`
        `NotANumberException` - if the previously stored value was not a number
        `NotAListException` - if the previously stored value was no list
        `EmptyListException` - if the stored value is an empty list but the op requires a non-empty list
        `AbortException` - if a commit failed
        `UnknownException` - if any other error occurs
      Since:
        3.18