- java.lang.Object
-
- com.machinezoo.hookless.ReactiveFuture<T>
-
- Type Parameters:
-
T
- type of result returned by the future
@StubDocs public class ReactiveFuture<T> extends Object
Reactive wrapper forCompletableFuture
.
-
-
Constructor Summary
Constructors Constructor Description ReactiveFuture()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancelled()
CompletableFuture<T>
completable()
boolean
done()
boolean
failed()
T
get()
T
get(long timeout, TimeUnit unit)
T
get(Duration timeout)
T
getNow(T fallback)
static CompletableFuture<Void>
runReactive(Runnable runnable)
static CompletableFuture<Void>
runReactive(Runnable runnable, Executor executor)
static <T> CompletableFuture<T>
supplyReactive(Supplier<T> supplier)
static <T> CompletableFuture<T>
supplyReactive(Supplier<T> supplier, Executor executor)
String
toString()
static <T> ReactiveFuture<T>
wrap(CompletableFuture<T> completable)
-
-
-
Method Detail
-
completable
public CompletableFuture<T> completable()
-
wrap
public static <T> ReactiveFuture<T> wrap(CompletableFuture<T> completable)
-
done
public boolean done()
-
failed
public boolean failed()
-
cancelled
public boolean cancelled()
-
get
public T get()
-
supplyReactive
public static <T> CompletableFuture<T> supplyReactive(Supplier<T> supplier, Executor executor)
-
supplyReactive
public static <T> CompletableFuture<T> supplyReactive(Supplier<T> supplier)
-
runReactive
public static CompletableFuture<Void> runReactive(Runnable runnable, Executor executor)
-
runReactive
public static CompletableFuture<Void> runReactive(Runnable runnable)
-
-