A factory function to "lift" computations into the Future monad.
A factory function to "lift" computations into the Future monad. It will catch nonfatal (see: com.twitter.util.NonFatal) exceptions and wrap them in the Throw[_] type. Non-exceptional values are wrapped in the Return[_] type.
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].
a java.util.List of Futures
a Future[java.util.List[A]] containing the collected values from fs.
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].
a sequence of Futures
a Future[Seq[A]] containing the collected values from fs.
Makes a Future with a constant result.
Make a Future with an error.
Make a Future with an error. E.g., Future.exception(new Exception("boo")).
Flattens a nested future.
Flattens a nested future. Same as ffa.flatten, but easier to call from Java.
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.
a java.util.List of Futures
a Future[Unit] whose value is populated when all of the fs return.
Join 22 futures.
Join 22 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 21 futures.
Join 21 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 20 futures.
Join 20 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 19 futures.
Join 19 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 18 futures.
Join 18 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 17 futures.
Join 17 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 16 futures.
Join 16 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 15 futures.
Join 15 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 14 futures.
Join 14 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 13 futures.
Join 13 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 12 futures.
Join 12 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 11 futures.
Join 11 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 10 futures.
Join 10 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 9 futures.
Join 9 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 8 futures.
Join 8 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 7 futures.
Join 7 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 6 futures.
Join 6 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 5 futures.
Join 5 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 4 futures.
Join 4 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 3 futures.
Join 3 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
Join 2 futures.
Join 2 futures. The returned future is complete when all underlying futures complete. It fails immediately if any of them do.
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.
a sequence of Futures
a Future[Unit] whose value is populated when all of the fs return.
Run the computation {{mkFuture}} while installing a monitor that translates any exception thrown into an encoded one.
Run the computation {{mkFuture}} while installing a monitor that translates any exception thrown into an encoded one. If an exception is thrown anywhere, the underlying computation is interrupted with that exception.
This function is usually called to wrap a computation that
returns a Future (f0) whose value is satisfied by the invocation
of an onSuccess/onFailure/ensure callbacks of another future
(f1). If an exception happens in the callbacks on f1, f0 is
never satisfied. In this example, Future.monitored { f1
onSuccess g; f0 }
will cancel f0 so that f0 never hangs.
A new future that can never complete.
Make a Future with an error.
Make a Future with an error. E.g., Future.exception(new Exception("boo")). The exception is not wrapped in any way.
"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.
a java.util.List
a Future[Tuple2[Try[A], java.util.List[Future[A]]]] representing the first future to be satisfied and the rest of the futures.
"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.
a scala.collection.Seq
Repeat a computation that returns a Future some number of times, after each computation completes.
Make a Future with a constant value.
Make a Future with a constant value. E.g., Future.value(1) is a Future[Int].
Repeat a computation that returns a Future while some predicate obtains, after each computation completes.
(Since version 5.x) Prefer static Future.Void.