Package io.lettuce.core
Interface RedisFuture<V>
-
- Type Parameters:
V
- Value type.
- All Superinterfaces:
CompletionStage<V>
,Future<V>
- All Known Implementing Classes:
AsyncCommand
,PipelinedRedisFuture
,TransactionalCommand
public interface RedisFuture<V> extends CompletionStage<V>, Future<V>
ARedisFuture
represents the result of an asynchronous computation, extendingCompletionStage
. The execution of the notification happens either on finish of the future execution or, if the future is completed already, immediately.- Since:
- 3.0
- Author:
- Mark Paluch
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
await(long timeout, TimeUnit unit)
Wait up to the specified time for the command output to become available.String
getError()
-
Methods inherited from interface java.util.concurrent.CompletionStage
acceptEither, acceptEitherAsync, acceptEitherAsync, applyToEither, applyToEitherAsync, applyToEitherAsync, exceptionally, handle, handleAsync, handleAsync, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, whenComplete, whenCompleteAsync, whenCompleteAsync
-
-
-
-
Method Detail
-
getError
String getError()
- Returns:
- error text, if any error occurred.
-
await
boolean await(long timeout, TimeUnit unit) throws InterruptedException
Wait up to the specified time for the command output to become available.- Parameters:
timeout
- Maximum time to wait for a result.unit
- Unit of time for the timeout.- Returns:
true
if the output became available.- Throws:
InterruptedException
- if the current thread is interrupted while waiting
-
-