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
Condition for
SET command key presence.- Since:
- 4.1
- Author:
- Yordan Tsintsov, Mark Paluch
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNXXXDo not set any additional command argument. -
Method Summary
Modifier and TypeMethodDescriptionstatic SetCondition.KeyConditionifAbsent()Perform theSEToperation only if the key is absent using theNXcondition.static SetCondition.KeyConditionPerform theSEToperation only if the key is present using theXXcondition.static SetCondition.KeyConditionupsert()Do not set any additional command argument.static SetCondition.KeyConditionReturns the enum constant of this class with the specified name.static SetCondition.KeyCondition[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UPSERT
Do not set any additional command argument. -
IF_PRESENT
XX -
IF_ABSENT
NX
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
upsert
Do not set any additional command argument. -
ifPresent
Perform theSEToperation only if the key is present using theXXcondition. -
ifAbsent
Perform theSEToperation only if the key is absent using theNXcondition.
-