- Type Parameters:
V- Value type.
- All Superinterfaces:
CompletionStage<V>,Future<V>
- All Known Implementing Classes:
AsyncCommand,TransactionalCommand
public interface RedisFuture<V> extends CompletionStage<V>, Future<V>
A
RedisFuture represents the result of an asynchronous computation, extending CompletionStage. 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
Methods inherited from interface java.util.concurrent.CompletionStage
acceptEither, acceptEitherAsync, acceptEitherAsync, applyToEither, applyToEitherAsync, applyToEitherAsync, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, 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 Details
-
getError
String getError()- Returns:
- error text, if any error occurred.
-
await
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:
trueif the output became available.- Throws:
InterruptedException- if the current thread is interrupted while waiting
-