Package io.lettuce.core.dynamic
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description io.lettuce.core.dynamic.BatchTasks
batch(RedisCommand<Object,Object,Object> command, CommandBatching batching)
Add command to theBatcher
.default io.lettuce.core.dynamic.BatchTasks
flush()
Force-flush the batch.
-
-
-
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 theBatcher
.- Parameters:
command
- the command to batch.batching
- invocation-specificCommandBatching
control. May benull
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.
-
-