Class SetCondition
java.lang.Object
org.springframework.data.redis.connection.SetCondition
Condition for
SET command.- Since:
- 4.1
- Author:
- Yordan Tsintsov, Mark Paluch
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumCondition forSETcommand key presence. -
Method Summary
Modifier and TypeMethodDescription@Nullable CompareConditionstatic SetConditionifAbsent()Perform theSEToperation only if the key is absent using theNXcondition.static SetConditionifDigestEquals(String digest) Perform theSEToperation only if the value digest value equalsdigestusing theIFDEQcondition.static SetConditionifDigestNotEquals(String digest) Perform theSEToperation only if the value digest value does not equaldigestusing theIFDNEcondition.static SetConditionifEquals(byte[] expectedValue) Perform theSEToperation only if the value at the key equals theexpectedValueusing theIFEQcondition.static SetConditionifNotEquals(byte[] expectedValue) Perform theSEToperation only if the value at the key does not equal theexpectedValueusing theIFNEcondition.static SetConditionPerform theSEToperation only if the key is present using theXXcondition.static SetConditionupsert()Create or update a key.
-
Method Details
-
upsert
Create or update a key. Does not addXXorNXconditions to theSETcommand. -
ifPresent
Perform theSEToperation only if the key is present using theXXcondition. -
ifAbsent
Perform theSEToperation only if the key is absent using theNXcondition. -
ifEquals
Perform theSEToperation only if the value at the key equals theexpectedValueusing theIFEQcondition. -
ifNotEquals
Perform theSEToperation only if the value at the key does not equal theexpectedValueusing theIFNEcondition. -
ifDigestEquals
Perform theSEToperation only if the value digest value equalsdigestusing theIFDEQcondition. -
ifDigestNotEquals
Perform theSEToperation only if the value digest value does not equaldigestusing theIFDNEcondition. -
getKeyCondition
-
getCompareCondition
-