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
-
Method Summary
Modifier and Type Method Description io.lettuce.core.dynamic.BatchTasksbatch(RedisCommand<Object,Object,Object> command, CommandBatching batching)Add command to theBatcher.default io.lettuce.core.dynamic.BatchTasksflush()Force-flush the batch.
-
Field Details
-
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 theBatcher.- Parameters:
command- the command to batch.batching- invocation-specificCommandBatchingcontrol. May benullto use default batching settings.- Returns:
- result of the batching. Either an
emptyresult 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.
-