Enum RedisClusterTransactions

    • Enum Constant Detail

      • DISABLED

        public static final RedisClusterTransactions DISABLED
        Redis transactions are not supported in the cluster. Transaction commands lead to an error.
      • SINGLE_NODE

        public static final RedisClusterTransactions SINGLE_NODE
        Redis transactions are supported in the cluster, but only when they target a single node. The 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.

    • Method Detail

      • values

        public static RedisClusterTransactions[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RedisClusterTransactions c : RedisClusterTransactions.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RedisClusterTransactions valueOf​(String name)
        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 name
        NullPointerException - if the argument is null