
io.lettuce.core.protocol.CompleteableCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lettuce-core Show documentation
Show all versions of lettuce-core Show documentation
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.protocol;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
/**
* Extension to commands that provide registration of command completion callbacks. Completion callbacks allow execution of
* tasks after successive, failed or any completion outcome. A callback must be non-blocking. Callback registration gives no
* guarantee over callback ordering.
*
* @author Mark Paluch
*/
public interface CompleteableCommand {
/**
* Register a command callback for successive command completion that notifies the callback with the command result.
*
* @param action must not be {@code null}.
*/
void onComplete(Consumer super T> action);
/**
* Register a command callback for command completion that notifies the callback with the command result or the failure
* resulting from command completion.
*
* @param action must not be {@code null}.
*/
void onComplete(BiConsumer super T, Throwable> action);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy