| Modifier and Type | Method and Description |
|---|---|
static <V> void |
adapt(Future<V> source,
CompletableFuture<V> target)
Adapt Netty's
Future emitting a value result into a CompletableFuture. |
static CompletableFuture<Void> |
allOf(Collection<? extends CompletionStage<?>> stages)
Create a composite
CompletableFuture that is composed of the given stages. |
static boolean |
await(Duration timeout,
Future<?> future)
Wait until future is complete or the supplied timeout is reached.
|
static boolean |
await(long timeout,
TimeUnit unit,
Future<?> future)
Wait until future is complete or the supplied timeout is reached.
|
static boolean |
awaitAll(Duration timeout,
Future<?>... futures)
Wait until futures are complete or the supplied timeout is reached.
|
static boolean |
awaitAll(long timeout,
TimeUnit unit,
Future<?>... futures)
Wait until futures are complete or the supplied timeout is reached.
|
static <T> T |
awaitOrCancel(RedisFuture<T> cmd,
long timeout,
TimeUnit unit)
Wait until futures are complete or the supplied timeout is reached.
|
static <T> CompletableFuture<T> |
failed(Throwable throwable)
Create a
CompletableFuture that is completed exceptionally with throwable. |
static <V> CompletionStage<V> |
toCompletionStage(Future<V> future)
Adapt Netty's
ChannelFuture emitting a Void result. |
public static CompletableFuture<Void> allOf(Collection<? extends CompletionStage<?>> stages)
CompletableFuture that is composed of the given stages.stages - must not be null.CompletableFuture.public static <T> CompletableFuture<T> failed(Throwable throwable)
CompletableFuture that is completed exceptionally with throwable.throwable - must not be null.CompletableFuture.public static <V> CompletionStage<V> toCompletionStage(Future<V> future)
ChannelFuture emitting a Void result.future - the ChannelFuture to adapt.CompletableFuture.public static <V> void adapt(Future<V> source, CompletableFuture<V> target)
Future emitting a value result into a CompletableFuture.source - source Future emitting signals.target - target CompletableFuture.public static boolean await(Duration timeout, Future<?> future)
timeout - Maximum time to wait for futures to complete.future - Future to wait for.true if future completes in time, otherwise falsepublic static boolean await(long timeout,
TimeUnit unit,
Future<?> future)
timeout - Maximum time to wait for futures to complete.unit - Unit of time for the timeout.future - Future to wait for.true if future completes in time, otherwise falsepublic static boolean awaitAll(Duration timeout, Future<?>... futures)
timeout - Maximum time to wait for futures to complete.futures - Futures to wait for.true if all futures complete in time, otherwise falsepublic static boolean awaitAll(long timeout,
TimeUnit unit,
Future<?>... futures)
timeout - Maximum time to wait for futures to complete.unit - Unit of time for the timeout.futures - Futures to wait for.true if all futures complete in time, otherwise falsepublic static <T> T awaitOrCancel(RedisFuture<T> cmd, long timeout, TimeUnit unit)
T - Result typecmd - Command to wait fortimeout - Maximum time to wait for futures to completeunit - Unit of time for the timeoutCopyright © 2024 lettuce.io. All rights reserved.