public class LettuceFutures extends Object
awaitAll(long, TimeUnit, Future[])
futures until they are done and to synchronize future execution using
awaitOrCancel(RedisFuture, long, TimeUnit)
.Modifier and Type | Method and Description |
---|---|
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.
|
public static boolean awaitAll(Duration timeout, Future<?>... futures)
awaitOrCancel(RedisFuture, long, TimeUnit)
) when the timeout expires.timeout
- Maximum time to wait for futures to complete.futures
- Futures to wait for.true
if all futures complete in time, otherwise false
public static boolean awaitAll(long timeout, TimeUnit unit, Future<?>... futures)
awaitOrCancel(RedisFuture, long, TimeUnit)
) when the timeout expires.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 false
public 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 © 2025 lettuce.io. All rights reserved.