akka.dispatch

Futures

object Futures extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Futures
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  7. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  9. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. def firstCompletedOf [T <: AnyRef] (futures: Iterable[Future[T]], timeout: Long): Future[T]

    Java API.

    Java API. Returns a Future to the result of the first future in the list that is completed

  12. def firstCompletedOf [T] (futures: Iterable[Future[T]], timeout: Long): Future[T]

    Returns a Future to the result of the first future in the list that is completed

  13. def fold [T <: AnyRef, R <: AnyRef] (zero: R, timeout: Long, futures: Iterable[Future[T]], fun: Function2[R, T, R]): Future[R]

    Java API A non-blocking fold over the specified futures.

    Java API A non-blocking fold over the specified futures. The fold is performed on the thread where the last future is completed, the result will be the first failure of any of the futures, or any failure in the actual fold, or the result of the fold.

  14. def fold [T, R] (zero: R, timeout: Long)(futures: Iterable[Future[T]])(foldFun: (R, T) ⇒ R): Future[R]

    A non-blocking fold over the specified futures.

    A non-blocking fold over the specified futures. The fold is performed on the thread where the last future is completed, the result will be the first failure of any of the futures, or any failure in the actual fold, or the result of the fold. Example:

      val result = Futures.fold(0)(futures)(_ + _).await.result
    

  15. def future [T] (body: Callable[T], timeout: Long, dispatcher: MessageDispatcher): Future[T]

    Java API, equivalent to Future.

    Java API, equivalent to Future.apply

  16. def future [T] (body: Callable[T], dispatcher: MessageDispatcher): Future[T]

    Java API, equivalent to Future.

    Java API, equivalent to Future.apply

  17. def future [T] (body: Callable[T], timeout: Long): Future[T]

    Java API, equivalent to Future.

    Java API, equivalent to Future.apply

  18. def future [T] (body: Callable[T]): Future[T]

    Java API, equivalent to Future.

    Java API, equivalent to Future.apply

  19. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  20. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  21. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  22. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  23. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  24. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  25. def reduce [T <: AnyRef, R >: T] (futures: Iterable[Future[T]], timeout: Long, fun: Function2[R, T, T]): Future[R]

    Java API.

    Java API. Initiates a fold over the supplied futures where the fold-zero is the result value of the Future that's completed first

  26. def reduce [T, R >: T] (futures: Iterable[Future[T]], timeout: Long)(op: (R, T) ⇒ T): Future[R]

    Initiates a fold over the supplied futures where the fold-zero is the result value of the Future that's completed first Example:

      val result = Futures.reduce(futures)(_ + _).await.result
    

  27. def sequence [A] (in: Iterable[Future[A]]): Future[Iterable[A]]

    Java API.

    Java API. Simple version of Futures.traverse. Transforms a java.lang.Iterable[Future[A]] into a Future[java.lang.Iterable[A]]. Useful for reducing many Futures into a single Future.

  28. def sequence [A] (in: Iterable[Future[A]], timeout: Long): Future[Iterable[A]]

    Java API.

    Java API. Simple version of Futures.traverse. Transforms a java.lang.Iterable[Future[A]] into a Future[java.lang.Iterable[A]]. Useful for reducing many Futures into a single Future.

  29. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  30. def toString (): String

    Definition Classes
    AnyRef → Any
  31. def traverse [A, B] (in: Iterable[A], fn: Function[A, Future[B]]): Future[Iterable[B]]

    Java API.

    Java API. Transforms a java.lang.Iterable[A] into a Future[java.lang.Iterable[B]] using the provided Function A ⇒ Future[B]. This is useful for performing a parallel map. For example, to apply a function to all items of a list in parallel.

  32. def traverse [A, B] (in: Iterable[A], timeout: Long, fn: Function[A, Future[B]]): Future[Iterable[B]]

    Java API.

    Java API. Transforms a java.lang.Iterable[A] into a Future[java.lang.Iterable[B]] using the provided Function A ⇒ Future[B]. This is useful for performing a parallel map. For example, to apply a function to all items of a list in parallel.

  33. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  34. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  35. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Deprecated Value Members

  1. def awaitAll (futures: List[akka.dispatch.Future[_]]): Unit

    (Blocking!)

    (Blocking!)

    Annotations
    @deprecated
    Deprecated

    Will be removed after 1.1, if you must block, use: futures.foreach(_.await)

  2. def awaitEither [T] (f1: Future[T], f2: Future[T]): Option[T]

    Returns Future.

    Returns Future.resultOrException of the first completed of the 2 Futures provided (blocking!)

    Annotations
    @deprecated
    Deprecated

    Will be removed after 1.1, if you must block, use: firstCompletedOf(List(f1,f2)).await.resultOrException

  3. def awaitMap [A, B] (in: Traversable[Future[A]])(fun: (Future[A]) ⇒ B): Traversable[B]

    Applies the supplied function to the specified collection of Futures after awaiting each future to be completed

    Applies the supplied function to the specified collection of Futures after awaiting each future to be completed

    Annotations
    @deprecated
    Deprecated

    Will be removed after 1.1, if you must block, use: futures map { f ⇒ fun(f.await) }

  4. def awaitOne (futures: List[akka.dispatch.Future[_]], timeout: Long = Long.MaxValue): akka.dispatch.Future[_]

    Returns the First Future that is completed (blocking!)

    Returns the First Future that is completed (blocking!)

    Annotations
    @deprecated
    Deprecated

    Will be removed after 1.1, if you must block, use: firstCompletedOf(futures).await

Inherited from AnyRef

Inherited from Any