Object

com.twitter.util

Futures

Related Doc: package util

Permalink

object Futures

Twitter Future utility methods for ease of use from java

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

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def collect[A, B](fs: Map[A, Future[B]]): Future[Map[A, B]]

    Permalink

    Collect the results from the given map fs of futures into a new future of map.

    Collect the results from the given map fs of futures into a new future of map. If one or more of the given Futures is exceptional, the resulting Future result will the first exception encountered.

  7. def collect[A](fs: List[Future[A]]): Future[List[A]]

    Permalink

    Collect the results from the given futures into a new future of Seq[A].

    Collect the results from the given futures into a new future of Seq[A]. If one or more of the given futures is exceptional, the resulting future result will be the first exception encountered.

    fs

    a java.util.List of Futures

    returns

    a Future[java.util.List[A]] containing the collected values from fs.

  8. def collectToTry[A](fs: List[Future[A]]): Future[List[Try[A]]]

    Permalink

    Collect the results from the given futures into a new future of List[Try[A]]

    Collect the results from the given futures into a new future of List[Try[A]]

    fs

    a java.util.List of Futures

    returns

    a Future[java.util.List[Try[A]]] containing the collected values from fs.

  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def flatten[A](ffa: Future[Future[A]]): Future[A]

    Permalink

    Flattens a nested future.

    Flattens a nested future. Same as ffa.flatten, but easier to call from Java.

  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. def join[A](fs: List[Future[A]]): Future[Unit]

    Permalink

    Take a sequence of Futures, wait till they all complete successfully.

    Take a sequence of Futures, wait till they all complete successfully. The future fails immediately if any of the joined Futures do, mimicking the semantics of exceptions.

    fs

    a java.util.List of Futures

    returns

    a Future[Unit] whose value is populated when all of the fs return.

  17. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F], g: Future[G], h: Future[H], i: Future[I], j: Future[J], k: Future[K], l: Future[L], m: Future[M], n: Future[N], o: Future[O], p: Future[P], q: Future[Q], r: Future[R], s: Future[S], t: Future[T], u: Future[U], v: Future[V]): Future[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)]

    Permalink

    Join 22 futures.

    Join 22 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  18. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F], g: Future[G], h: Future[H], i: Future[I], j: Future[J], k: Future[K], l: Future[L], m: Future[M], n: Future[N], o: Future[O], p: Future[P], q: Future[Q], r: Future[R], s: Future[S], t: Future[T], u: Future[U]): Future[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)]

    Permalink

    Join 21 futures.

    Join 21 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  19. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F], g: Future[G], h: Future[H], i: Future[I], j: Future[J], k: Future[K], l: Future[L], m: Future[M], n: Future[N], o: Future[O], p: Future[P], q: Future[Q], r: Future[R], s: Future[S], t: Future[T]): Future[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)]

    Permalink

    Join 20 futures.

    Join 20 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  20. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F], g: Future[G], h: Future[H], i: Future[I], j: Future[J], k: Future[K], l: Future[L], m: Future[M], n: Future[N], o: Future[O], p: Future[P], q: Future[Q], r: Future[R], s: Future[S]): Future[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)]

    Permalink

    Join 19 futures.

    Join 19 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  21. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F], g: Future[G], h: Future[H], i: Future[I], j: Future[J], k: Future[K], l: Future[L], m: Future[M], n: Future[N], o: Future[O], p: Future[P], q: Future[Q], r: Future[R]): Future[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)]

    Permalink

    Join 18 futures.

    Join 18 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  22. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F], g: Future[G], h: Future[H], i: Future[I], j: Future[J], k: Future[K], l: Future[L], m: Future[M], n: Future[N], o: Future[O], p: Future[P], q: Future[Q]): Future[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)]

    Permalink

    Join 17 futures.

    Join 17 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  23. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F], g: Future[G], h: Future[H], i: Future[I], j: Future[J], k: Future[K], l: Future[L], m: Future[M], n: Future[N], o: Future[O], p: Future[P]): Future[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)]

    Permalink

    Join 16 futures.

    Join 16 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  24. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F], g: Future[G], h: Future[H], i: Future[I], j: Future[J], k: Future[K], l: Future[L], m: Future[M], n: Future[N], o: Future[O]): Future[(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)]

    Permalink

    Join 15 futures.

    Join 15 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  25. def join[A, B, C, D, E, F, G, H, I, J, K, L, M, N](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F], g: Future[G], h: Future[H], i: Future[I], j: Future[J], k: Future[K], l: Future[L], m: Future[M], n: Future[N]): Future[(A, B, C, D, E, F, G, H, I, J, K, L, M, N)]

    Permalink

    Join 14 futures.

    Join 14 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  26. def join[A, B, C, D, E, F, G, H, I, J, K, L, M](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F], g: Future[G], h: Future[H], i: Future[I], j: Future[J], k: Future[K], l: Future[L], m: Future[M]): Future[(A, B, C, D, E, F, G, H, I, J, K, L, M)]

    Permalink

    Join 13 futures.

    Join 13 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  27. def join[A, B, C, D, E, F, G, H, I, J, K, L](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F], g: Future[G], h: Future[H], i: Future[I], j: Future[J], k: Future[K], l: Future[L]): Future[(A, B, C, D, E, F, G, H, I, J, K, L)]

    Permalink

    Join 12 futures.

    Join 12 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  28. def join[A, B, C, D, E, F, G, H, I, J, K](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F], g: Future[G], h: Future[H], i: Future[I], j: Future[J], k: Future[K]): Future[(A, B, C, D, E, F, G, H, I, J, K)]

    Permalink

    Join 11 futures.

    Join 11 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  29. def join[A, B, C, D, E, F, G, H, I, J](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F], g: Future[G], h: Future[H], i: Future[I], j: Future[J]): Future[(A, B, C, D, E, F, G, H, I, J)]

    Permalink

    Join 10 futures.

    Join 10 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  30. def join[A, B, C, D, E, F, G, H, I](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F], g: Future[G], h: Future[H], i: Future[I]): Future[(A, B, C, D, E, F, G, H, I)]

    Permalink

    Join 9 futures.

    Join 9 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  31. def join[A, B, C, D, E, F, G, H](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F], g: Future[G], h: Future[H]): Future[(A, B, C, D, E, F, G, H)]

    Permalink

    Join 8 futures.

    Join 8 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  32. def join[A, B, C, D, E, F, G](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F], g: Future[G]): Future[(A, B, C, D, E, F, G)]

    Permalink

    Join 7 futures.

    Join 7 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  33. def join[A, B, C, D, E, F](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E], f: Future[F]): Future[(A, B, C, D, E, F)]

    Permalink

    Join 6 futures.

    Join 6 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  34. def join[A, B, C, D, E](a: Future[A], b: Future[B], c: Future[C], d: Future[D], e: Future[E]): Future[(A, B, C, D, E)]

    Permalink

    Join 5 futures.

    Join 5 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  35. def join[A, B, C, D](a: Future[A], b: Future[B], c: Future[C], d: Future[D]): Future[(A, B, C, D)]

    Permalink

    Join 4 futures.

    Join 4 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  36. def join[A, B, C](a: Future[A], b: Future[B], c: Future[C]): Future[(A, B, C)]

    Permalink

    Join 3 futures.

    Join 3 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  37. def join[A, B](a: Future[A], b: Future[B]): Future[(A, B)]

    Permalink

    Join 2 futures.

    Join 2 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.

  38. def lowerFromTry[T](f: Future[Try[T]]): Future[T]

    Permalink

    Lowers a Future[Try[T]] into a Future[T].

  39. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  40. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  41. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  42. def select[A](fs: List[Future[A]]): Future[(Try[A], List[Future[A]])]

    Permalink

    "Select" off the first future to be satisfied.

    "Select" off the first future to be satisfied. Return this as a result, with the remainder of the Futures as a sequence.

    fs

    a java.util.List

    returns

    a Future[Tuple2[Try[A], java.util.List[Future[A]]]] representing the first future to be satisfied and the rest of the futures.

  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  44. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  45. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped