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 Detail

      • NONE

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

      • 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.