You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command batching for synchronous commands is only possible when the return type is ignored because the command result is only available after command execution. Reactive commands cannot participate in batching because of the deferred execution model.
Batching could be specified either by annotation @BatchSize or a CommandBatching that is specified on a per-invocation basis.
The text was updated successfully, but these errors were encountered:
Lettuce now supports command batching for dynamic command interfaces. Command batching executes commands in a deferred nature. This also means that at the time of invocation no result is available. Batching can be only used with synchronous methods without a return value, void or asynchronous methods returning a RedisFuture. Reactive command batching is not supported because reactive executed commands maintain an own subscription lifecycle that is decoupled from command method batching.
Command errors that occur during batching cause a BatchException that contains the failed commands.
@batchsize(50)
interface MyCommands extends Commands {
void set(String key, String value);
Future<String> get(String key);
void set(String key, String value, CommandBatching flush);
}
MyCommands commands = …
commands.set("key", "value");
commands.set("key", "value", CommandBatching.flush());
The dynamic API should support batching of commands when using synchronous and asynchronous executions.
Command batching for synchronous commands is only possible when the return type is ignored because the command result is only available after command execution. Reactive commands cannot participate in batching because of the deferred execution model.
Batching could be specified either by annotation
@BatchSize
or aCommandBatching
that is specified on a per-invocation basis.The text was updated successfully, but these errors were encountered: