Module lettuce.core

Interface CompleteableCommand<T>

All Known Implementing Classes:
AsyncCommand, CommandWrapper, TracedCommand, TransactionalCommand

public interface CompleteableCommand<T>
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
  • Method Summary

    Modifier and Type Method Description
    void onComplete​(BiConsumer<? super T,​Throwable> action)
    Register a command callback for command completion that notifies the callback with the command result or the failure resulting from command completion.
    void onComplete​(Consumer<? super T> action)
    Register a command callback for successive command completion that notifies the callback with the command result.
  • Method Details

    • onComplete

      void onComplete​(Consumer<? super T> action)
      Register a command callback for successive command completion that notifies the callback with the command result.
      Parameters:
      action - must not be null.
    • onComplete

      void onComplete​(BiConsumer<? super T,​Throwable> action)
      Register a command callback for command completion that notifies the callback with the command result or the failure resulting from command completion.
      Parameters:
      action - must not be null.