akka.dispatch

Future

object Future extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Future
  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 apply [T] (body: ⇒ T, timeout: Long)(implicit dispatcher: MessageDispatcher): Future[T]

    This method constructs and returns a Future that will eventually hold the result of the execution of the supplied body The execution is performed by the specified Dispatcher.

  7. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  8. def blocking ()(implicit dispatcher: MessageDispatcher): Unit

    Assures that any Future tasks initiated in the current thread will be executed asynchronously, including any tasks currently queued to be executed in the current thread.

    Assures that any Future tasks initiated in the current thread will be executed asynchronously, including any tasks currently queued to be executed in the current thread. This is needed if the current task may block, causing delays in executing the remaining tasks which in some cases may cause a deadlock.

    Note: Calling 'Future.await' will automatically trigger this method.

    For example, in the following block of code the call to 'latch.open' might not be executed until after the call to 'latch.await', causing a deadlock. By adding 'Future.blocking()' the call to 'latch.open' will instead be dispatched separately from the current block, allowing it to be run in parallel:

    val latch = new StandardLatch
    val future = Future() map { _ ⇒
      Future.blocking()
      val nested = Future()
      nested foreach (_ ⇒ latch.open)
      latch.await
    }
    

  9. def channel (timeout: Long = Actor.TIMEOUT)(implicit dispatcher: MessageDispatcher): ActorCompletableFuture

    Construct a completable channel

  10. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. def empty [T] (timeout: Long = Actor.TIMEOUT)(implicit dispatcher: MessageDispatcher): DefaultCompletableFuture[T]

    Create an empty Future with default timeout

  12. def eq (arg0: AnyRef): Boolean

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

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

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  15. def flow [A] (body: ⇒ A @util.continuations.package.cps[akka.dispatch.Future[Any]], timeout: Long)(implicit dispatcher: MessageDispatcher): Future[A]

    Captures a block that will be transformed into 'Continuation Passing Style' using Scala's Delimited Continuations plugin.

    Captures a block that will be transformed into 'Continuation Passing Style' using Scala's Delimited Continuations plugin.

    Within the block, the result of a Future may be accessed by calling Future.apply. At that point execution is suspended with the rest of the block being stored in a continuation until the result of the Future is available. If an Exception is thrown while processing, it will be contained within the resulting Future.

    This allows working with Futures in an imperative style without blocking for each result.

    Completing a Future using 'CompletableFuture << Future' will also suspend execution until the value of the other Future is available.

    The Delimited Continuations compiler plugin must be enabled in order to use this method.

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

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

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

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef
  22. def sequence [A, M[_] <: Traversable[_]] (in: M[Future[A]], timeout: Long)(implicit cbf: CanBuildFrom[M[Future[A]], A, M[A]]): Future[M[A]]

    Simple version of Futures.

    Simple version of Futures.traverse. Transforms a Traversable[Future[A]] into a Future[Traversable[A]]. Useful for reducing many Futures into a single Future.

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

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

    Definition Classes
    AnyRef → Any
  25. def traverse [A, B, M[_] <: Traversable[_]] (in: M[A], timeout: Long)(fn: (A) ⇒ Future[B])(implicit cbf: CanBuildFrom[M[A], B, M[B]]): Future[M[B]]

    Transforms a Traversable[A] into a Future[Traversable[B]] using the provided Function A ⇒ Future[B].

    Transforms a Traversable[A] into a Future[Traversable[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:

    val myFutureList = Futures.traverse(myList)(x ⇒ Future(myFunc(x)))
    

  26. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any