public enum RedisClusterTransactions extends Enum<RedisClusterTransactions>
This is only meaningful in case of a cluster Redis client.
Enum Constant and Description |
---|
DISABLED
Redis transactions are not supported in the cluster.
|
SINGLE_NODE
Redis transactions are supported in the cluster, but only when they
target a single node.
|
Modifier and Type | Method and Description |
---|---|
static RedisClusterTransactions |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RedisClusterTransactions[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RedisClusterTransactions DISABLED
public static final RedisClusterTransactions SINGLE_NODE
MULTI
command is queued and is only
issued when the next command is executed. This next command binds
the connection to the corresponding node of the Redis cluster (so it should
have keys, otherwise the target node is random). All subsequent commands
are targeted to that node. If some of the subsequent commands have a key
that belongs to another node, the command fails on the server side.
If WATCH
is used before MULTI
, its key(s) determine to which
node the connection is bound and the subsequent MULTI
is not queued.
If WATCH
keys belong to multiple nodes, the command fails on the client side.
public static RedisClusterTransactions[] values()
for (RedisClusterTransactions c : RedisClusterTransactions.values()) System.out.println(c);
public static RedisClusterTransactions valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2025 Eclipse. All rights reserved.