Executes a RedisBatch on this client by sending its commands to the Redis node in a single network
message (technically, a single akka.io.Tcp.Write
message).
Executes a RedisBatch on this client by sending its commands to the Redis node in a single network
message (technically, a single akka.io.Tcp.Write
message). Therefore it's also naturally guaranteed that
all commands in a batch are executed on the same connection.
Note that even though connection used by RedisNodeClient are automatically reconnected, it's still possible that an error is returned for some batches that were executed around the time connection failure happened. To be precise, ConnectionClosedException is returned for batches that were sent through the connection but the connection failed before a response could be received. There is no way to safely retry such batches because it is unknown whether Redis node actually received and executed them or not.
Execution of each command in the batch or the whole batch may fail due to following reasons:
Executes a RedisOp on this client.
Executes a RedisOp on this client. RedisOp is a sequence of dependent RedisBatches,
that requires an exclusive access to a single Redis connection. Typically, a RedisOp is a
WATCH
-MULTI
-EXEC
transaction (see RedisOp for more details).
Note that the client does not handle optimistic lock failures (which happen when watched key is modified by other client). An OptimisticLockException is returned in such cases and you must recover from it manually.
Execution of a RedisOp may also fail for the same reasons as specified for RedisBatch in executeBatch. Be especially careful when using node clients obtained from cluster client.
Waits until all Redis connections are initialized and initOp
is executed.
Waits until all Redis connections are initialized and initOp
is executed.
Note that you can call executeBatch and executeOp even if the client is not yet initialized -
requests will be internally queued and executed after initialization is complete.
Redis client implementation for a single Redis node using a connection pool. Connection pool size is constant and batches and operations are distributed over connections using round-robin scheme. Connections are automatically reconnected upon failure (possibly with an appropriate delay, see NodeConfig for details).