Package: io.vertx.groovy.core

## [Groovy] Class CompositeFuture

- io.vertx.groovy.core.CompositeFuture

- The composite future wraps a list of futures, it is useful when several futures needs to be coordinated.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `CompositeFuture (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `static CompositeFuture` | `all(Future<T1> f1, Future<T2> f2)` Return a composite future, succeeded when all futures are succeeded, failed when any future is failed.
    `static CompositeFuture` | `all(Future<T1> f1, Future<T2> f2, Future<T3> f3)` Like CompositeFuture.all but with 3 futures.
    `static CompositeFuture` | `all(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4)` Like CompositeFuture.all but with 4 futures.
    `static CompositeFuture` | `all(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5)` Like CompositeFuture.all but with 5 futures.
    `static CompositeFuture` | `all(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5, Future<T6> f6)` Like CompositeFuture.all but with 6 futures.
    `static CompositeFuture` | `all(java.util.List<Future> futures)` Like CompositeFuture.all but with a list of futures.
    `static CompositeFuture` | `any(Future<T1> f1, Future<T2> f2)` Return a composite future, succeeded when any futures is succeeded, failed when all futures are failed.
    `static CompositeFuture` | `any(Future<T1> f1, Future<T2> f2, Future<T3> f3)` Like CompositeFuture.any but with 3 futures.
    `static CompositeFuture` | `any(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4)` Like CompositeFuture.any but with 4 futures.
    `static CompositeFuture` | `any(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5)` Like CompositeFuture.any but with 5 futures.
    `static CompositeFuture` | `any(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5, Future<T6> f6)` Like CompositeFuture.any but with 6 futures.
    `static CompositeFuture` | `any(java.util.List<Future> futures)` Like CompositeFuture.any but with a list of futures.
    `java.lang.Throwable` | `cause(int index)` Returns a cause of a wrapped future
    `boolean` | `failed(int index)` Returns true if a wrapped future is failed
    `java.lang.Object` | `getDelegate()`
    `boolean` | `isComplete(int index)` Returns true if a wrapped future is completed
    `T` | `result(int index)` Returns the result of a wrapped future
    `CompositeFuture` | `setHandler(io.vertx.core.Handler<io.vertx.core.AsyncResult<CompositeFuture>> handler)`
    `int` | `size()` @return Returns: the number of wrapped future
    `boolean` | `succeeded(int index)` Returns true if a wrapped future is succeeded

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Future` | `cause, complete, complete, completer, compose, compose, fail, fail, failed, failedFuture, future, getDelegate, isComplete, map, map, result, setHandler, succeeded, succeededFuture, succeededFuture`
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### CompositeFuture(java.lang.Object delegate)

  - ### Method Detail

    - #### static CompositeFuture all(Future<T1> f1, Future<T2> f2)

      Return a composite future, succeeded when all futures are succeeded, failed when any future is failed.

      The returned future fails as soon as one of `f1` or `f2` fails.
      Returns:
        the composite future
      Parameters:
        `f1` - future
        `f2` - future

    - #### static CompositeFuture all(Future<T1> f1, Future<T2> f2, Future<T3> f3)

      Like CompositeFuture.all but with 3 futures.

      Returns:
      Parameters:
        f1
        f2
        f3

    - #### static CompositeFuture all(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4)

      Like CompositeFuture.all but with 4 futures.

      Returns:
      Parameters:
        f1
        f2
        f3
        f4

    - #### static CompositeFuture all(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5)

      Like CompositeFuture.all but with 5 futures.

      Returns:
      Parameters:
        f1
        f2
        f3
        f4
        f5

    - #### static CompositeFuture all(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5, Future<T6> f6)

      Like CompositeFuture.all but with 6 futures.

      Returns:
      Parameters:
        f1
        f2
        f3
        f4
        f5
        f6

    - #### static CompositeFuture all(java.util.List<Future> futures)

      Like CompositeFuture.all but with a list of futures.

      When the list is empty, the returned future will be already completed.

      Returns:
      Parameters:
        futures

    - #### static CompositeFuture any(Future<T1> f1, Future<T2> f2)

      Return a composite future, succeeded when any futures is succeeded, failed when all futures are failed.

      The returned future succeeds as soon as one of `f1` or `f2` succeeds.
      Returns:
        the composite future
      Parameters:
        `f1` - future
        `f2` - future

    - #### static CompositeFuture any(Future<T1> f1, Future<T2> f2, Future<T3> f3)

      Like CompositeFuture.any but with 3 futures.

      Returns:
      Parameters:
        f1
        f2
        f3

    - #### static CompositeFuture any(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4)

      Like CompositeFuture.any but with 4 futures.

      Returns:
      Parameters:
        f1
        f2
        f3
        f4

    - #### static CompositeFuture any(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5)

      Like CompositeFuture.any but with 5 futures.

      Returns:
      Parameters:
        f1
        f2
        f3
        f4
        f5

    - #### static CompositeFuture any(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5, Future<T6> f6)

      Like CompositeFuture.any but with 6 futures.

      Returns:
      Parameters:
        f1
        f2
        f3
        f4
        f5
        f6

    - #### static CompositeFuture any(java.util.List<Future> futures)

      Like CompositeFuture.any but with a list of futures.

      When the list is empty, the returned future will be already completed.

      Returns:
      Parameters:
        futures

    - #### java.lang.Throwable cause(int index)

      Returns a cause of a wrapped future

      Returns:
      Parameters:
        `index` - the wrapped future index

    - #### boolean failed(int index)

      Returns true if a wrapped future is failed

      Returns:
      Parameters:
        `index` - the wrapped future index

    - #### java.lang.Object getDelegate()

    - #### boolean isComplete(int index)

      Returns true if a wrapped future is completed

      Returns:
      Parameters:
        `index` - the wrapped future index

    - #### T result(int index)

      Returns the result of a wrapped future

      Returns:
      Parameters:
        `index` - the wrapped future index

    - #### CompositeFuture setHandler(io.vertx.core.Handler<io.vertx.core.AsyncResult<CompositeFuture>> handler)

    - #### int size()

      Returns:
        the number of wrapped future

    - #### boolean succeeded(int index)

      Returns true if a wrapped future is succeeded

      Returns:
      Parameters:
        `index` - the wrapped future index