public class FastFuture<A>
extends scala.AnyVal
Future
,
which try to avoid scheduling to an ExecutionContext
if possible, i.e. if the given future
value is already present.Modifier and Type | Class and Description |
---|---|
static class |
FastFuture.EnhancedFuture<T> |
static class |
FastFuture.EnhancedFuture$ |
Constructor and Description |
---|
FastFuture(scala.concurrent.Future<A> future) |
Modifier and Type | Method and Description |
---|---|
static <T> scala.concurrent.Future<T> |
apply(scala.util.Try<T> value) |
static scala.Function1<java.lang.Throwable,scala.concurrent.Future<scala.runtime.Nothing$>> |
failed() |
scala.concurrent.Future<A> |
filter(scala.Function1<A,java.lang.Object> pred,
scala.concurrent.ExecutionContext executor) |
<B> scala.concurrent.Future<B> |
flatMap(scala.Function1<A,scala.concurrent.Future<B>> f,
scala.concurrent.ExecutionContext ec) |
void |
foreach(scala.Function1<A,scala.runtime.BoxedUnit> f,
scala.concurrent.ExecutionContext ec) |
scala.concurrent.Future<A> |
future() |
<B> scala.concurrent.Future<B> |
map(scala.Function1<A,B> f,
scala.concurrent.ExecutionContext ec) |
<B> scala.concurrent.Future<B> |
recover(scala.PartialFunction<java.lang.Throwable,B> pf,
scala.concurrent.ExecutionContext ec) |
<B> scala.concurrent.Future<B> |
recoverWith(scala.PartialFunction<java.lang.Throwable,scala.concurrent.Future<B>> pf,
scala.concurrent.ExecutionContext ec) |
static <T,M extends scala.collection.IterableOnce<java.lang.Object>> |
sequence(M in,
scala.collection.BuildFrom<M,T,M> cbf,
scala.concurrent.ExecutionContext executor) |
static <T> scala.Function1<T,scala.concurrent.Future<T>> |
successful() |
<B> scala.concurrent.Future<B> |
transformWith(scala.Function1<A,scala.concurrent.Future<B>> s,
scala.Function1<java.lang.Throwable,scala.concurrent.Future<B>> f,
scala.concurrent.ExecutionContext executor) |
<B> scala.concurrent.Future<B> |
transformWith(scala.Function1<scala.util.Try<A>,scala.concurrent.Future<B>> f,
scala.concurrent.ExecutionContext executor) |
static <A,B,M extends scala.collection.IterableOnce<java.lang.Object>> |
traverse(M in,
scala.Function1<A,scala.concurrent.Future<B>> fn,
scala.collection.BuildFrom<M,B,M> cbf,
scala.concurrent.ExecutionContext executor) |
public FastFuture(scala.concurrent.Future<A> future)
public static <T> scala.concurrent.Future<T> apply(scala.util.Try<T> value)
public static <T> scala.Function1<T,scala.concurrent.Future<T>> successful()
public static scala.Function1<java.lang.Throwable,scala.concurrent.Future<scala.runtime.Nothing$>> failed()
public static <T,M extends scala.collection.IterableOnce<java.lang.Object>> scala.concurrent.Future<M> sequence(M in, scala.collection.BuildFrom<M,T,M> cbf, scala.concurrent.ExecutionContext executor)
public static <A,B,M extends scala.collection.IterableOnce<java.lang.Object>> scala.concurrent.Future<M> traverse(M in, scala.Function1<A,scala.concurrent.Future<B>> fn, scala.collection.BuildFrom<M,B,M> cbf, scala.concurrent.ExecutionContext executor)
public scala.concurrent.Future<A> future()
public <B> scala.concurrent.Future<B> map(scala.Function1<A,B> f, scala.concurrent.ExecutionContext ec)
public <B> scala.concurrent.Future<B> flatMap(scala.Function1<A,scala.concurrent.Future<B>> f, scala.concurrent.ExecutionContext ec)
public scala.concurrent.Future<A> filter(scala.Function1<A,java.lang.Object> pred, scala.concurrent.ExecutionContext executor)
public void foreach(scala.Function1<A,scala.runtime.BoxedUnit> f, scala.concurrent.ExecutionContext ec)
public <B> scala.concurrent.Future<B> transformWith(scala.Function1<scala.util.Try<A>,scala.concurrent.Future<B>> f, scala.concurrent.ExecutionContext executor)
public <B> scala.concurrent.Future<B> transformWith(scala.Function1<A,scala.concurrent.Future<B>> s, scala.Function1<java.lang.Throwable,scala.concurrent.Future<B>> f, scala.concurrent.ExecutionContext executor)
public <B> scala.concurrent.Future<B> recover(scala.PartialFunction<java.lang.Throwable,B> pf, scala.concurrent.ExecutionContext ec)
public <B> scala.concurrent.Future<B> recoverWith(scala.PartialFunction<java.lang.Throwable,scala.concurrent.Future<B>> pf, scala.concurrent.ExecutionContext ec)