Module lettuce.core

Interface Batcher


public interface Batcher
Command batcher to enqueue commands and flush a batch once a flush is requested or a configured command threshold is reached.
Since:
5.0
Author:
Mark Paluch
See Also:
SimpleBatcher
  • Field Summary

    Fields
    Modifier and Type Field Description
    static Batcher NONE
    Batcher that does not support batching.
  • Method Summary

    Modifier and Type Method Description
    io.lettuce.core.dynamic.BatchTasks batch​(RedisCommand<Object,​Object,​Object> command, CommandBatching batching)
    Add command to the Batcher.
    default io.lettuce.core.dynamic.BatchTasks flush()
    Force-flush the batch.
  • Field Details

    • NONE

      static final Batcher NONE
      Batcher that does not support batching.
  • Method Details

    • batch

      io.lettuce.core.dynamic.BatchTasks batch​(RedisCommand<Object,​Object,​Object> command, CommandBatching batching)
      Add command to the Batcher.
      Parameters:
      command - the command to batch.
      batching - invocation-specific CommandBatching control. May be null to use default batching settings.
      Returns:
      result of the batching. Either an empty result or a result containing the batched commands.
    • flush

      default io.lettuce.core.dynamic.BatchTasks flush()
      Force-flush the batch. Has no effect if the queue is empty.