Package glide.api.models.commands
Enum SetOptions.ConditionalSet
- java.lang.Object
-
- java.lang.Enum<SetOptions.ConditionalSet>
-
- glide.api.models.commands.SetOptions.ConditionalSet
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<SetOptions.ConditionalSet>
- Enclosing class:
- SetOptions
public static enum SetOptions.ConditionalSet extends java.lang.Enum<SetOptions.ConditionalSet>
Conditions which define whether new value should be set or not.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ONLY_IF_DOES_NOT_EXISTOnly set the key if it does not already exist.ONLY_IF_EQUALOnly set the key if the current value of key equals theSetOptions.comparisonValue.ONLY_IF_EXISTSOnly set the key if it already exists.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetValkeyApi()static SetOptions.ConditionalSetvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static SetOptions.ConditionalSet[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ONLY_IF_EXISTS
public static final SetOptions.ConditionalSet ONLY_IF_EXISTS
Only set the key if it already exists. Equivalent toXXin the Valkey API.
-
ONLY_IF_DOES_NOT_EXIST
public static final SetOptions.ConditionalSet ONLY_IF_DOES_NOT_EXIST
Only set the key if it does not already exist. Equivalent toNXin the Valkey API.
-
ONLY_IF_EQUAL
public static final SetOptions.ConditionalSet ONLY_IF_EQUAL
Only set the key if the current value of key equals theSetOptions.comparisonValue. Equivalent toIFEQ comparison-valuein the Valkey API.
-
-
Method Detail
-
values
public static SetOptions.ConditionalSet[] 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 (SetOptions.ConditionalSet c : SetOptions.ConditionalSet.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SetOptions.ConditionalSet valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getValkeyApi
public java.lang.String getValkeyApi()
-
-