schema

## Class RunOperation

- java.lang.Object
- - schema.RunOperation

-     abstract class RunOperation
      extends Object

  Utility class to run a KVStore operation and handle `FaultExceptions` according to this application's policies. The `doOperation` method is abstract and must be implemented by callers. `doOperation` is called by the `run()` method of this class.

  This class is a placeholder for implementing application-specific exception handling policies. This implementation simply prints the exception details to `System.err`. In addition to performing other actions when an exception occurs, applications may wish to extend this mechanism to perform retries under certain conditions.

  Note that `OperationExecutionException` is not handled by this class because it is a contingency exception that is expected to be handled by the operation itself (the `doOperation` method).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RunOperation()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) abstract void` | `doOperation()` Must be implemented to perform the operation.
    `(package private) void` | `run()` Calls the doOperation method and handles exceptions as needed.

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

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

- - ### Constructor Detail

    - #### RunOperation

          RunOperation()

  - ### Method Detail

    - #### doOperation

          abstract void doOperation()

      Must be implemented to perform the operation.

    - #### run

          void run()
             throws FaultException

      Calls the doOperation method and handles exceptions as needed.
      Throws:
        `FaultException`

Copyright (c) 2011, 2014 Oracle and/or its affiliates. All rights reserved.