Class ConcurrentExecutionStatus

  • Direct Known Subclasses:
    SingleConcurrentExecutionStatus

    public abstract class ConcurrentExecutionStatus
    extends Object
    A status object used in co-ordinating concurrent jobs.
    Since:
    1.6
    Author:
    Sina Madani
    • Field Detail

    • Constructor Detail

      • ConcurrentExecutionStatus

        public ConcurrentExecutionStatus()
    • Method Detail

      • getException

        public Throwable getException()
      • getResult

        protected abstract Object getResult​(Object lockObj)
      • getResult

        public final Object getResult()
      • register

        public final boolean register()
      • register

        protected abstract boolean register​(Object lockObj)
        Parameters:
        lockObj -
        Returns:
        true if registration was successful.
      • isInProgress

        public final boolean isInProgress()
      • isInProgress

        protected abstract boolean isInProgress​(Object lockObj)
      • completeSuccessfully

        public final void completeSuccessfully()
      • completeSuccessfully

        protected abstract void completeSuccessfully​(Object lockObj)
      • completeWithResult

        public final void completeWithResult​(Object result)
      • completeWithResult

        protected abstract void completeWithResult​(Object lockObj,
                                                   Object result)
      • completeExceptionallyBase

        protected final boolean completeExceptionallyBase​(Throwable t)
      • completeExceptionally

        public abstract void completeExceptionally​(Throwable exception)
      • waitForExceptionalCompletion

        public Throwable waitForExceptionalCompletion()
      • waitForCompletion

        protected abstract boolean waitForCompletion​(Object lockObj,
                                                     Supplier<Boolean> targetState)
        Waits until either exceptional or successful completion conditions are signalled.
        Returns:
        Whether the completion was successful (true) or exceptional (false).
      • waitForCompletion

        public final boolean waitForCompletion​(Supplier<Boolean> targetState)
      • waitForCompletion

        protected final boolean waitForCompletion​(Object lockObj)
      • waitForCompletion

        public final boolean waitForCompletion()