@Beta @NonNullByDefault public final class FluentFutures extends Object
FluentFutures. This class provides methods which should really live in
Guava's, for example in Futures, as the implementations provided by Futures.immediateFuture(Object)
and others already implement FluentFuture and so getting a FluentFuture is a matter of pure boiler-plate.
immediateBooleanFluentFuture(boolean), immediateBooleanFluentFuture(Boolean),
immediateFalseFluentFuture(), immediateTrueFluentFuture() and immediateNullFluentFuture()
provide low-cardinality constants, which are generally useful to reduce allocations.
| Modifier and Type | Method and Description |
|---|---|
static com.google.common.util.concurrent.FluentFuture<Boolean> |
immediateBooleanFluentFuture(boolean result)
Return a
FluentFuture which is immediately completed, reporting specified result. |
static com.google.common.util.concurrent.FluentFuture<Boolean> |
immediateBooleanFluentFuture(Boolean result)
Return a
FluentFuture which is immediately completed, reporting specified result. |
static <T> com.google.common.util.concurrent.FluentFuture<T> |
immediateCancelledFluentFuture()
Return a
FluentFuture which is immediately Future.cancel(boolean)led. |
static <T> com.google.common.util.concurrent.FluentFuture<T> |
immediateFailedFluentFuture(Throwable cause)
Return a
FluentFuture which is immediately failed, reporting specified failure cause. |
static com.google.common.util.concurrent.FluentFuture<Boolean> |
immediateFalseFluentFuture()
Return a
FluentFuture which is immediately completed, reporting specified Boolean.TRUE. |
static <T> com.google.common.util.concurrent.FluentFuture<T> |
immediateFluentFuture(T result)
Return a
FluentFuture which is immediately completed, reporting specified result. |
static <T> com.google.common.util.concurrent.FluentFuture<T> |
immediateNullFluentFuture()
Return a
FluentFuture which is immediately completed with a null result. |
static com.google.common.util.concurrent.FluentFuture<Boolean> |
immediateTrueFluentFuture()
Return a
FluentFuture which is immediately completed, reporting specified Boolean.TRUE. |
public static <T> com.google.common.util.concurrent.FluentFuture<T> immediateCancelledFluentFuture()
FluentFuture which is immediately Future.cancel(boolean)led.public static <T> com.google.common.util.concurrent.FluentFuture<T> immediateFailedFluentFuture(Throwable cause)
FluentFuture which is immediately failed, reporting specified failure cause.cause - failure causeNullPointerException - if cause is nullpublic static <T> com.google.common.util.concurrent.FluentFuture<T> immediateFluentFuture(T result)
FluentFuture which is immediately completed, reporting specified result.result - result of the futureNullPointerException - if result is nullpublic static <T> com.google.common.util.concurrent.FluentFuture<T> immediateNullFluentFuture()
FluentFuture which is immediately completed with a null result.public static com.google.common.util.concurrent.FluentFuture<Boolean> immediateBooleanFluentFuture(Boolean result)
FluentFuture which is immediately completed, reporting specified result.result - boolean resultresultNullPointerException - if result is nullpublic static com.google.common.util.concurrent.FluentFuture<Boolean> immediateBooleanFluentFuture(boolean result)
FluentFuture which is immediately completed, reporting specified result.result - boolean resultresultpublic static com.google.common.util.concurrent.FluentFuture<Boolean> immediateTrueFluentFuture()
FluentFuture which is immediately completed, reporting specified Boolean.TRUE.Boolean.TRUEpublic static com.google.common.util.concurrent.FluentFuture<Boolean> immediateFalseFluentFuture()
FluentFuture which is immediately completed, reporting specified Boolean.TRUE.Boolean.TRUECopyright © 2019 OpenDaylight. All rights reserved.