Class SetCondition

java.lang.Object
org.springframework.data.redis.connection.SetCondition

public class SetCondition extends Object
Condition for SET command.
Since:
4.1
Author:
Yordan Tsintsov, Mark Paluch
  • Method Details

    • upsert

      public static SetCondition upsert()
      Create or update a key. Does not add XX or NX conditions to the SET command.
    • ifPresent

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

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

      public static SetCondition ifEquals(byte[] expectedValue)
      Perform the SET operation only if the value at the key equals the expectedValue using the IFEQ condition.
    • ifNotEquals

      public static SetCondition ifNotEquals(byte[] expectedValue)
      Perform the SET operation only if the value at the key does not equal the expectedValue using the IFNE condition.
    • ifDigestEquals

      public static SetCondition ifDigestEquals(String digest)
      Perform the SET operation only if the value digest value equals digest using the IFDEQ condition.
    • ifDigestNotEquals

      public static SetCondition ifDigestNotEquals(String digest)
      Perform the SET operation only if the value digest value does not equal digest using the IFDNE condition.
    • getKeyCondition

      public SetCondition.KeyCondition getKeyCondition()
    • getCompareCondition

      public @Nullable CompareCondition getCompareCondition()