Interface SetSpec<K,V>

Type Parameters:
K - key type.
V - value type.

public interface SetSpec<K,V>
Steps for configuring a SET operation.
Since:
4.1
Author:
Yordan Tsintsov
See Also:
  • Method Details

    • always

      SetSpec<K,V> always()
      Set the key unconditionally.
      Returns:
      this builder.
    • ifAbsent

      SetSpec<K,V> ifAbsent()
      Set the key if it does not exist.
      Returns:
      this builder.
    • ifPresent

      SetSpec<K,V> ifPresent()
      Set the key if it exists.
      Returns:
      this builder.
    • ifEquals

      Configure to set the value only if the value matches the given value or digest.
      Returns:
      a SetSpec.ComparisonSpec to specify the value or digest to compare against.
    • ifNotEquals

      SetSpec.ComparisonSpec<K,V> ifNotEquals()
      Configure to set the value only if the value does not match the given value or digest.
      Returns:
      a SetSpec.ComparisonSpec to specify the value or digest to compare against.
    • keepTtl

      SetSpec<K,V> keepTtl()
      Retain the existing TTL associated with the key.
      Returns:
      this builder.
    • expire

      default SetSpec<K,V> expire(Duration timeout)
      Set the key to expire after the given duration.
      Parameters:
      timeout - the duration after which the key expires.
      Returns:
      this builder.
    • expiration

      SetSpec<K,V> expiration(Expiration expiration)
      Set the key with the given expiration.
      Parameters:
      expiration - the expiration to apply.
      Returns:
      this builder.