Class DummyOperationContext

java.lang.Object
org.apache.activemq.artemis.core.persistence.impl.journal.DummyOperationContext
All Implemented Interfaces:
IOCallback, IOCompletion, OperationContext

public final class DummyOperationContext extends Object implements OperationContext
  • Constructor Details

    • DummyOperationContext

      public DummyOperationContext()
  • Method Details

    • getInstance

      public static OperationContext getInstance()
    • executeOnCompletion

      public void executeOnCompletion(IOCallback runnable)
      Description copied from interface: OperationContext
      Execute the task when all IO operations are complete, Or execute it immediately if nothing is pending.
      Specified by:
      executeOnCompletion in interface OperationContext
      Parameters:
      runnable - the tas to be executed.
    • executeOnCompletion

      public void executeOnCompletion(IOCallback runnable, OperationConsistencyLevel consistencyLevel)
      Description copied from interface: OperationContext
      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.
      Specified by:
      executeOnCompletion in interface OperationContext
    • replicationDone

      public void replicationDone()
      Specified by:
      replicationDone in interface OperationContext
    • replicationLineUp

      public void replicationLineUp()
      Specified by:
      replicationLineUp in interface OperationContext
    • storeLineUp

      public void storeLineUp()
      Specified by:
      storeLineUp in interface IOCompletion
    • done

      public void done()
      Description copied from interface: IOCallback
      Method for sync notifications. When this callback method is called, there is a guarantee the data is written on the disk.

      Note:Leave this method as soon as possible, or you would be blocking the whole notification thread

      Specified by:
      done in interface IOCallback
    • onError

      public void onError(int errorCode, String errorMessage)
      Description copied from interface: IOCallback
      Method for error notifications. Observation: The whole file will be probably failing if this happens. Like, if you delete the file, you will start to get errors for these operations
      Specified by:
      onError in interface IOCallback
    • waitCompletion

      public void waitCompletion()
      Specified by:
      waitCompletion in interface OperationContext
    • waitCompletion

      public boolean waitCompletion(long timeout)
      Description copied from interface: OperationContext
      Wait for the completion of this operation.
      Specified by:
      waitCompletion in interface OperationContext
      Parameters:
      timeout - how long to wait in milliseconds
      Returns:
      true if the operation completed within the specified timeout; false if not
    • pageSyncLineUp

      public void pageSyncLineUp()
      Specified by:
      pageSyncLineUp in interface OperationContext
    • pageSyncDone

      public void pageSyncDone()
      Specified by:
      pageSyncDone in interface OperationContext