object Futures
Twitter Future utility methods for ease of use from java
- Alphabetic
- By Inheritance
- Futures
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def collect[A, B](fs: Map[A, Future[B]]): Future[Map[A, B]]
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. - def collect[A](fs: List[Future[A]]): Future[List[A]]
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.
- def collectToTry[A](fs: List[Future[A]]): Future[List[Try[A]]]
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.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def flatten[A](ffa: Future[Future[A]]): Future[A]
Flattens a nested future.
Flattens a nested future. Same as ffa.flatten, but easier to call from Java.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def join[A](fs: List[Future[A]]): Future[Unit]
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.
- 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)]
Join 22 futures.
Join 22 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 21 futures.
Join 21 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 20 futures.
Join 20 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 19 futures.
Join 19 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 18 futures.
Join 18 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 17 futures.
Join 17 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 16 futures.
Join 16 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 15 futures.
Join 15 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 14 futures.
Join 14 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 13 futures.
Join 13 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 12 futures.
Join 12 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 11 futures.
Join 11 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 10 futures.
Join 10 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 9 futures.
Join 9 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 8 futures.
Join 8 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 7 futures.
Join 7 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 6 futures.
Join 6 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- 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)]
Join 5 futures.
Join 5 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- def join[A, B, C, D](a: Future[A], b: Future[B], c: Future[C], d: Future[D]): Future[(A, B, C, D)]
Join 4 futures.
Join 4 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- def join[A, B, C](a: Future[A], b: Future[B], c: Future[C]): Future[(A, B, C)]
Join 3 futures.
Join 3 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- def join[A, B](a: Future[A], b: Future[B]): Future[(A, B)]
Join 2 futures.
Join 2 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
- def lowerFromTry[T](f: Future[Try[T]]): Future[T]
Lowers a Future[Try[T]] into a Future[T].
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def select[A](fs: List[Future[A]]): Future[(Try[A], List[Future[A]])]
"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.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()