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 <T> T |
await(long timeout,
TimeUnit unit,
RedisFuture<T> cmd)
Deprecated.
The method name does not reflect what the method is doing, therefore it is deprecated. Use
awaitOrCancel(RedisFuture, long, TimeUnit) instead. The semantics did not change and
awaitOrCancel(RedisFuture, long, TimeUnit) simply calls this method. |
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(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.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 timeout@Deprecated public static <T> T await(long timeout, TimeUnit unit, RedisFuture<T> cmd)
awaitOrCancel(RedisFuture, long, TimeUnit)
instead. The semantics did not change and
awaitOrCancel(RedisFuture, long, TimeUnit)
simply calls this method.T
- Result typecmd
- Command to wait fortimeout
- Maximum time to wait for futures to completeunit
- Unit of time for the timeoutCopyright © 2018 lettuce.io. All rights reserved.