All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.lettuce.core.RedisFuture Maven / Gradle / Ivy

Go to download

Advanced and thread-safe Java Redis client for synchronous, asynchronous, and reactive usage. Supports Cluster, Sentinel, Pipelining, Auto-Reconnect, Codecs and much more.

The newest version!
package io.lettuce.core;

import java.util.concurrent.CompletionStage;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;

/**
 * A {@code RedisFuture} represents the result of an asynchronous computation, extending {@link CompletionStage}. The execution
 * of the notification happens either on finish of the future execution or, if the future is completed already, immediately.
 *
 * @param  Value type.
 * @author Mark Paluch
 * @since 3.0
 */
public interface RedisFuture extends CompletionStage, Future {

    /**
     * @return error text, if any error occurred.
     */
    String getError();

    /**
     * Wait up to the specified time for the command output to become available.
     *
     * @param timeout Maximum time to wait for a result.
     * @param unit Unit of time for the timeout.
     *
     * @return {@code true} if the output became available.
     * @throws InterruptedException if the current thread is interrupted while waiting
     */
    boolean await(long timeout, TimeUnit unit) throws InterruptedException;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy