public class LettuceFutures extends Object
awaitAll(long, TimeUnit, Future[])
futures until they are done and to synchronize future execution using
awaitOrCancel(RedisCommand, long, TimeUnit)
.Modifier and Type | Method and Description |
---|---|
static <K,V,T> T |
await(RedisCommand<K,V,T> cmd,
long timeout,
TimeUnit unit)
Deprecated.
The method name does not reflect what the method is doing, therefore it is deprecated. Use
awaitOrCancel(RedisCommand, long, TimeUnit) instead. The semantics did not change and
awaitOrCancel(RedisCommand, 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 <K,V,T> T |
awaitOrCancel(RedisCommand<K,V,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)
await(RedisCommand, 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 <K,V,T> T awaitOrCancel(RedisCommand<K,V,T> cmd, long timeout, TimeUnit unit)
K
- Key type.V
- Value type.T
- Result type.cmd
- Command to wait for.timeout
- Maximum time to wait for futures to complete.unit
- Unit of time for the timeout.@Deprecated public static <K,V,T> T await(RedisCommand<K,V,T> cmd, long timeout, TimeUnit unit)
awaitOrCancel(RedisCommand, long, TimeUnit)
instead. The semantics did not change and
awaitOrCancel(RedisCommand, long, TimeUnit)
simply calls this method.K
- Key type.V
- Value type.T
- Result type.cmd
- Command to wait for.timeout
- Maximum time to wait for futures to complete.unit
- Unit of time for the timeout.Copyright © 2016. All rights reserved.