Enum RedisClusterTransactions
- All Implemented Interfaces:
Serializable, Comparable<RedisClusterTransactions>
Define how Redis transactions are handled in a clustered Redis client.
This is only meaningful in case of a cluster Redis client.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRedis transactions are not supported in the cluster.Redis transactions are supported in the cluster, but only when they target a single node. -
Method Summary
Modifier and TypeMethodDescriptionstatic RedisClusterTransactionsReturns 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.
-
Enum Constant Details
-
DISABLED
Redis transactions are not supported in the cluster. Transaction commands lead to an error. -
SINGLE_NODE
Redis transactions are supported in the cluster, but only when they target a single node. TheMULTIcommand 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
WATCHis used beforeMULTI, its key(s) determine to which node the connection is bound and the subsequentMULTIis not queued. IfWATCHkeys belong to multiple nodes, the command fails on the client side.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-