Interface RedisMap<K,V>
- All Superinterfaces:
BoundKeyOperations<String>,ConcurrentMap<K,,V> Map<K,,V> RedisStore
- All Known Implementing Classes:
DefaultRedisMap,RedisProperties
Map view of a Redis hash.
- Author:
- Costin Leau, Christoph Strobl, Tihomi Mateev, Mark Paluch
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a bound operations object to perform operations on the hash field expiration for all hash fields at the boundBoundKeyOperations.getKey().hashFieldExpiration(Collection<K> hashFields) Returns a bound operations object to perform operations on the hash field expiration for all hash fields at the boundBoundKeyOperations.getKey()for the given hash fields.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 boundBoundKeyOperations.getKey()for the given hash fields.Incrementvalueof the hashkeyby the givendelta.Incrementvalueof the hashkeyby the givendelta.Get a random entry from the hash.Get a random key from the hash.scan()Methods inherited from interface org.springframework.data.redis.core.BoundKeyOperations
expiration, expire, expire, expireAt, expireAt, getExpire, getKey, getType, persist, renameMethods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllMethods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, valuesMethods inherited from interface org.springframework.data.redis.support.collections.RedisStore
getOperations
-
Method Details
-
increment
Incrementvalueof the hashkeyby the givendelta.- Parameters:
key- must not be null.delta-- Returns:
- null if hash does not exist.
- Since:
- 1.0
-
increment
Incrementvalueof the hashkeyby the givendelta.- 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
Get a random entry from the hash.- Returns:
- null if the hash does not exist.
- Since:
- 2.6
-
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 boundBoundKeyOperations.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
Returns a bound operations object to perform operations on the hash field expiration for all hash fields at the boundBoundKeyOperations.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
Returns a bound operations object to perform operations on the hash field expiration for all hash fields at the boundBoundKeyOperations.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
-