Interface Sequence<C extends FlowContext>

Type Parameters:
C - the type of the context shared between tasks
All Superinterfaces:
Promisable<C>, Subscription<C>

public interface Sequence<C extends FlowContext> extends Promisable<C>, Subscription<C>
An interface to control the parallel and sequential execution of asynchronous tasks.
  • Field Details

    • DEFAULT_FAIL_FAST

      static final boolean DEFAULT_FAIL_FAST
      By default, the execution of tasks fail fast.
      See Also:
    • DEFAULT_TIMEOUT

      static final long DEFAULT_TIMEOUT
      By default, no timeout is used.
      See Also:
  • Method Details

    • failFast

      Sequence<C> failFast(boolean failFast)
      Whether the execution of tasks should fail fast or fail last. Defaults to true<C extends FlowContext>.
    • timeout

      Sequence<C> timeout(long timeout)
      The timeout in milliseconds for the sequence. Defaults to no timeout (-1L<C extends FlowContext>).

      Please note that this only applies to sequential flows. The timeout has no effect for parallel flows. The promise API does not provide a method to cancel running promises.