vertx-lang-scala-docs_2.12 3.6.0.CR2 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package core
  Definition Classes
    scala
-  package cli
  Definition Classes
    core
-  package datagram
  Definition Classes
    core
-  package dns
  Definition Classes
    core
-  package eventbus
  Definition Classes
    core
-  package file
  Definition Classes
    core
-  package http
  Definition Classes
    core
-  package metrics
  Definition Classes
    core
-  package net
  Definition Classes
    core
-  package parsetools
  Definition Classes
    core
-  package shareddata
  Definition Classes
    core
-  package streams
  Definition Classes
    core
- CompositeFuture
- Context
- DeploymentOptions
- Future
- MultiMap
- TimeoutStream
- Vertx
- VertxOptions
- WorkerExecutor

c

io.vertx.scala.core

# CompositeFuture 

###
Companion object CompositeFuture

#### class CompositeFuture extends Future[CompositeFuture]

The composite future wraps a list of io.vertx.scala.core.Future, it is useful when several futures needs to be coordinated. The handlers set for the coordinated futures are overridden by the handler of the composite future.

Linear Supertypes
Future[CompositeFuture], AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. CompositeFuture
2. Future
3. AnyRef
4. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new CompositeFuture(_asJava: AnyRef)

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
5.  def asJava: AnyRef
   Definition Classes
     Future
6.  def cause(index: Int): Throwable

   Returns a cause of a wrapped future * @param index the wrapped future index

7.  def cause(): Throwable

   A Throwable describing failure.

   A Throwable describing failure. This will be null if the operation succeeded. * @return the cause or null if the operation succeeded.

   Definition Classes
     Future
8.  def clone(): AnyRef
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @native() @throws( ... )
9.  def complete(): Unit

   Set this instance as result.

   Set this instance as result. Any handler will be called, if there is one, and the future will be marked as completed.

   Definition Classes
     CompositeFuture → Future
10.  def complete(result: CompositeFuture): Unit

    Set the result.

    Set the result. Any handler will be called, if there is one, and the future will be marked as completed. * @param result the result

    Definition Classes
      CompositeFuture → Future
11.  def completer(): Handler[AsyncResult[CompositeFuture]]

    returns

      an handler completing this future

    Definition Classes
      CompositeFuture → Future
12.  def compose[U](mapper: (CompositeFuture) ⇒ Future[U])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[U]): Future[U]

    Compose this future with a `mapper` function.

    Compose this future with a `mapper` function.

    When this future (the one on which `compose` is called) succeeds, the `mapper` will be called with the completed value and this mapper returns another future object. This returned future completion will complete the future returned by this method call.

    If the `mapper` throws an exception, the returned future will be failed with this exception.

    When this future fails, the failure will be propagated to the returned future and the `mapper` will not be called. * @param mapper the mapper function

    returns

      the composed future

    Definition Classes
      CompositeFuture → Future
13.  def compose[U](handler: Handler[CompositeFuture], next: Future[U])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[U]): Future[U]

    Compose this future with a provided `next` future.

    Compose this future with a provided `next` future.

    When this (the one on which `compose` is called) future succeeds, the `handler` will be called with the completed value, this handler should complete the next future.

    If the `handler` throws an exception, the returned future will be failed with this exception.

    When this future fails, the failure will be propagated to the `next` future and the `handler` will not be called. * @param handler the handler

    next

      the next future

    returns

      the next future, used for chaining

    Definition Classes
      CompositeFuture → Future
14.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
15.  def equals(arg0: Any): Boolean
    Definition Classes
      AnyRef → Any
16.  def fail(failureMessage: String): Unit

    Try to set the failure.

    Try to set the failure. When it happens, any handler will be called, if there is one, and the future will be marked as completed. * @param failureMessage the failure message

    Definition Classes
      Future
17.  def fail(cause: Throwable): Unit

    Set the failure.

    Set the failure. Any handler will be called, if there is one, and the future will be marked as completed. * @param cause the failure cause

    Definition Classes
      Future
18.  def failed(index: Int): Boolean

    Returns true if a wrapped future is failed * @param index the wrapped future index

19.  def failed(): Boolean

    Did it fail? * @return true if it failed or false otherwise

    Did it fail? * @return true if it failed or false otherwise

    Definition Classes
      Future
20.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
21.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
22.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
23.  def isComplete(index: Int): Boolean

    Returns true if a wrapped future is completed * @param index the wrapped future index

24.  def isComplete(): Boolean

    Has the future completed?

    Has the future completed?

    It's completed if it's either succeeded or failed. * @return true if completed, false if not

    Definition Classes
      Future
25.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
26.  def map[U](mapper: (CompositeFuture) ⇒ U)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[U]): Future[U]

    Apply a `mapper` function on this future.

    Apply a `mapper` function on this future.

    When this future succeeds, the `mapper` will be called with the completed value and this mapper returns a value. This value will complete the future returned by this method call.

    If the `mapper` throws an exception, the returned future will be failed with this exception.

    When this future fails, the failure will be propagated to the returned future and the `mapper` will not be called. * @param mapper the mapper function

    returns

      the mapped future

    Definition Classes
      CompositeFuture → Future
27.  def map[V](value: V)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[V]): Future[V]

    Map the result of a future to a specific `value`.

    Map the result of a future to a specific `value`.

    When this future succeeds, this `value` will complete the future returned by this method call.

    When this future fails, the failure will be propagated to the returned future. * @param value the value that eventually completes the mapped future

    returns

      the mapped future

    Definition Classes
      Future
28.  def mapEmpty[V]()(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[V]): Future[V]

    Map the result of a future to `null`.

    Map the result of a future to `null`.

    This is a conveniency for `future.map((T) null)` or `future.map((Void) null)`.

    When this future succeeds, `null` will complete the future returned by this method call.

    When this future fails, the failure will be propagated to the returned future. * @return the mapped future

    Definition Classes
      Future
29.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
30.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
31.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
32.  def otherwise(value: CompositeFuture): Future[CompositeFuture]

    Map the failure of a future to a specific `value`.

    Map the failure of a future to a specific `value`.

    When this future fails, this `value` will complete the future returned by this method call.

    When this future succeeds, the result will be propagated to the returned future. * @param value the value that eventually completes the mapped future

    returns

      the mapped future

    Definition Classes
      CompositeFuture → Future
33.  def otherwise(mapper: (Throwable) ⇒ CompositeFuture): Future[CompositeFuture]

    Apply a `mapper` function on this future.

    Apply a `mapper` function on this future.

    When this future fails, the `mapper` will be called with the completed value and this mapper returns a value. This value will complete the future returned by this method call.

    If the `mapper` throws an exception, the returned future will be failed with this exception.

    When this future succeeds, the result will be propagated to the returned future and the `mapper` will not be called. * @param mapper the mapper function

    returns

      the mapped future

    Definition Classes
      CompositeFuture → Future
34.  def otherwiseEmpty(): Future[CompositeFuture]

    Map the failure of a future to `null`.

    Map the failure of a future to `null`.

    This is a convenience for `future.otherwise((T) null)`.

    When this future fails, the `null` value will complete the future returned by this method call.

    When this future succeeds, the result will be propagated to the returned future. * @return the mapped future

    Definition Classes
      CompositeFuture → Future
35.  def recover(mapper: (Throwable) ⇒ Future[CompositeFuture]): Future[CompositeFuture]

    Handles a failure of this Future by returning the result of another Future.

    Handles a failure of this Future by returning the result of another Future. If the mapper fails, then the returned future will be failed with this failure. * @param mapper A function which takes the exception of a failure and returns a new future.

    returns

      A recovered future

    Definition Classes
      CompositeFuture → Future
36.  def result(): CompositeFuture

    The result of the operation.

    The result of the operation. This will be null if the operation failed. * @return the result or null if the operation failed.

    Definition Classes
      CompositeFuture → Future
37.  def resultAt[T](index: Int)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): T

    Returns the result of a wrapped future * @param index the wrapped future index

38.  def setHandler(handler: Handler[AsyncResult[CompositeFuture]]): CompositeFuture

    Set a handler for the result.

    Set a handler for the result.

    If the future has already been completed it will be called immediately. Otherwise it will be called when the future is completed. * @param handler the Handler that will be called with the result

    returns

      a reference to this, so it can be used fluently

    Definition Classes
      CompositeFuture → Future
39.  def size(): Int

    returns

      the number of wrapped future

40.  def succeeded(index: Int): Boolean

    Returns true if a wrapped future is succeeded * @param index the wrapped future index

41.  def succeeded(): Boolean

    Did it succeed? * @return true if it succeded or false otherwise

    Did it succeed? * @return true if it succeded or false otherwise

    Definition Classes
      Future
42.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
43.  def toString(): String
    Definition Classes
      AnyRef → Any
44.  def tryComplete(): Boolean

    Try to set this instance as result.

    Try to set this instance as result. When it happens, any handler will be called, if there is one, and the future will be marked as completed. * @return false when the future is already completed

    Definition Classes
      CompositeFuture → Future
45.  def tryComplete(result: CompositeFuture): Boolean

    Set the failure.

    Set the failure. Any handler will be called, if there is one, and the future will be marked as completed. * @param result the result

    returns

      false when the future is already completed

    Definition Classes
      CompositeFuture → Future
46.  def tryFail(failureMessage: String): Boolean

    Try to set the failure.

    Try to set the failure. When it happens, any handler will be called, if there is one, and the future will be marked as completed. * @param failureMessage the failure message

    returns

      false when the future is already completed

    Definition Classes
      Future
47.  def tryFail(cause: Throwable): Boolean

    Try to set the failure.

    Try to set the failure. When it happens, any handler will be called, if there is one, and the future will be marked as completed. * @param cause the failure cause

    returns

      false when the future is already completed

    Definition Classes
      Future
48.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
49.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
50.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @native() @throws( ... )

### Inherited from Future[CompositeFuture]

### Inherited from AnyRef

### Inherited from Any

### Ungrouped