Interface BoundHashFieldExpirationOperations<HK>

Type Parameters:
HK - type of the hash field names.

public interface BoundHashFieldExpirationOperations<HK>
Hash Field Expiration operations bound to a certain hash key and set of hash fields.
Since:
3.5
Author:
Mark Paluch
  • Method Details

    • expire

      default ExpireChanges<HK> expire(Expiration expiration)
      Apply Expiration to the bound hash key/hash fields without any additional constraints.
      Parameters:
      expiration - the expiration definition.
      Returns:
      changes to the hash fields. null when used in pipeline / transaction.
    • expire

      ExpireChanges<HK> expire(Expiration expiration, ExpirationOptions options)
      Apply Expiration to the bound hash key/hash fields given expiration options.
      Parameters:
      expiration - the expiration definition.
      options - expiration options.
      Returns:
      changes to the hash fields. null when used in pipeline / transaction.
    • expire

      @Nullable ExpireChanges<HK> expire(Duration timeout)
      Set time to live for the bound hash key/hash fields.
      Parameters:
      timeout - the amount of time after which the key will be expired, must not be null.
      Returns:
      changes to the hash fields. null when used in pipeline / transaction.
      Throws:
      IllegalArgumentException - if the timeout is null.
      Since:
      3.5
      See Also:
    • expireAt

      @Nullable ExpireChanges<HK> expireAt(Instant expireAt)
      Set the expiration for the bound hash key/hash fields as a date timestamp.
      Parameters:
      expireAt - must not be null.
      Returns:
      changes to the hash fields. null when used in pipeline / transaction.
      Throws:
      IllegalArgumentException - if the instant is null or too large to represent as a Date.
      Since:
      3.5
      See Also:
    • persist

      Remove the expiration from the bound hash key/hash fields.
      Returns:
      changes to the hash fields. null when used in pipeline / transaction.
      Since:
      3.5
      See Also:
    • getTimeToLive

      @Nullable Expirations<HK> getTimeToLive()
      Get the time to live for bound hash key/hash fields in seconds.
      Returns:
      the actual expirations in seconds for the hash fields. null when used in pipeline / transaction.
      Since:
      3.5
      See Also:
    • getTimeToLive

      @Nullable Expirations<HK> getTimeToLive(TimeUnit timeUnit)
      Get the time to live for the bound hash key/hash fields and convert it to the given TimeUnit.
      Parameters:
      timeUnit - must not be null.
      Returns:
      the actual expirations for the hash fields in the given time unit. null when used in pipeline / transaction.
      Since:
      3.5
      See Also: