Interface OperationContext

All Superinterfaces:
IOCallback, IOCompletion
All Known Implementing Classes:
DummyOperationContext, OperationContextImpl

public interface OperationContext extends IOCompletion
This represents a set of operations done as part of replication.

When the entire set is done, a group of Runnables can be executed.

  • Method Details

    • executeOnCompletion

      void executeOnCompletion(IOCallback runnable, OperationConsistencyLevel consistencyLevel)
      Execute the task when all IO operations are complete, Or execute it immediately if nothing is pending. Notice it's possible to pass a consistencyLevel to what should be waited before completing the operation.
    • executeOnCompletion

      void executeOnCompletion(IOCallback runnable)
      Execute the task when all IO operations are complete, Or execute it immediately if nothing is pending.
      Parameters:
      runnable - the tas to be executed.
    • replicationLineUp

      void replicationLineUp()
    • replicationDone

      void replicationDone()
    • pageSyncLineUp

      void pageSyncLineUp()
    • pageSyncDone

      void pageSyncDone()
    • waitCompletion

      void waitCompletion() throws Exception
      Throws:
      Exception
    • waitCompletion

      boolean waitCompletion(long timeout) throws Exception
      Wait for the completion of this operation.
      Parameters:
      timeout - how long to wait in milliseconds
      Returns:
      true if the operation completed within the specified timeout; false if not
      Throws:
      Exception
    • reset

      default void reset()