Module 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>
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 Details

    • 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