Interface Operation

  • All Superinterfaces:
    java.lang.Runnable
    All Known Implementing Classes:
    AbstractOperation, AbstractReadWriteLockOperation, RunnableOperation

    public interface Operation
    extends java.lang.Runnable
    Represents some operation that can be executed. In essence this class is a lightweight task encapsulation. The operation can be canceled, which prevents its execution if execution has not yet started. Operation execution is initiated by a call to Runnable.run().
    Author:
    Garret Wilson
    • Method Detail

      • cancel

        void cancel()
        Cancels the operation. If called before execution has started, the operation will not execute.
      • isCanceled

        boolean isCanceled()
        Returns:
        Whether this operation has been canceled and should not execute.