Interface RedisMap<K,V>

All Superinterfaces:
BoundKeyOperations<String>, ConcurrentMap<K,V>, Map<K,V>, RedisStore
All Known Implementing Classes:
DefaultRedisMap, RedisProperties

public interface RedisMap<K,V> extends RedisStore, ConcurrentMap<K,V>
Map view of a Redis hash.
Author:
Costin Leau, Christoph Strobl, Tihomi Mateev, Mark Paluch
  • Method Details

    • increment

      Long increment(K key, long delta)
      Increment value of the hash key by the given delta.
      Parameters:
      key - must not be null.
      delta -
      Returns:
      null if hash does not exist.
      Since:
      1.0
    • increment

      Double increment(K key, double delta)
      Increment value of the hash key by the given delta.
      Parameters:
      key - must not be null.
      delta -
      Returns:
      null if hash does not exist.
      Since:
      1.1
    • randomKey

      K randomKey()
      Get a random key from the hash.
      Returns:
      null if the hash does not exist.
      Since:
      2.6
    • randomEntry

      @Nullable Map.Entry<K,V> randomEntry()
      Get a random entry from the hash.
      Returns:
      null if the hash does not exist.
      Since:
      2.6
    • scan

      Iterator<Map.Entry<K,V>> scan()
      Returns:
      Since:
      1.4
    • hashFieldExpiration

      BoundHashFieldExpirationOperations<K> hashFieldExpiration()
      Returns a bound operations object to perform operations on the hash field expiration for all hash fields at the bound BoundKeyOperations.getKey(). Operations on the expiration object obtain keys at the time of invoking any expiration operation.
      Returns:
      the bound operations object to perform operations on the hash field expiration.
      Since:
      3.5
    • hashFieldExpiration

      default BoundHashFieldExpirationOperations<K> hashFieldExpiration(K... hashFields)
      Returns a bound operations object to perform operations on the hash field expiration for all hash fields at the bound BoundKeyOperations.getKey() for the given hash fields.
      Parameters:
      hashFields - collection of hash fields to operate on.
      Returns:
      the bound operations object to perform operations on the hash field expiration.
      Since:
      3.5
    • hashFieldExpiration

      BoundHashFieldExpirationOperations<K> hashFieldExpiration(Collection<K> hashFields)
      Returns a bound operations object to perform operations on the hash field expiration for all hash fields at the bound BoundKeyOperations.getKey() for the given hash fields.
      Parameters:
      hashFields - collection of hash fields to operate on.
      Returns:
      the bound operations object to perform operations on the hash field expiration.
      Since:
      3.5