Enum Class SetCondition.KeyCondition

java.lang.Object
java.lang.Enum<SetCondition.KeyCondition>
org.springframework.data.redis.connection.SetCondition.KeyCondition
All Implemented Interfaces:
Serializable, Comparable<SetCondition.KeyCondition>, Constable
Enclosing class:
SetCondition

public static enum SetCondition.KeyCondition extends Enum<SetCondition.KeyCondition>
Condition for SET command key presence.
Since:
4.1
Author:
Yordan Tsintsov, Mark Paluch
  • Enum Constant Details

  • Method Details

    • values

      public static SetCondition.KeyCondition[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SetCondition.KeyCondition valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • upsert

      public static SetCondition.KeyCondition upsert()
      Do not set any additional command argument.
    • ifPresent

      public static SetCondition.KeyCondition ifPresent()
      Perform the SET operation only if the key is present using the XX condition.
    • ifAbsent

      public static SetCondition.KeyCondition ifAbsent()
      Perform the SET operation only if the key is absent using the NX condition.