|
Spring Data Key-Value | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RedisOperations<K,V>
Interface that specified a basic set of Redis operations, implemented by RedisTemplate
.
Not often used but a useful option for extensibility and testability (as it can be easily mocked or stubbed).
Method Summary | ||
---|---|---|
|
boundHashOps(K key)
Returns the operations performed on hash values bound to the given key. |
|
BoundListOperations<K,V> |
boundListOps(K key)
Returns the operations performed on list values bound to the given key. |
|
BoundSetOperations<K,V> |
boundSetOps(K key)
Returns the operations performed on set values bound to the given key. |
|
BoundValueOperations<K,V> |
boundValueOps(K key)
Returns the operations performed on simple values (or Strings in Redis terminology) bound to the given key. |
|
BoundZSetOperations<K,V> |
boundZSetOps(K key)
Returns the operations performed on zset values (also known as sorted sets) bound to the given key. |
|
void |
convertAndSend(String destination,
Object message)
|
|
void |
delete(Collection<K> key)
|
|
void |
discard()
|
|
Object |
exec()
|
|
|
execute(RedisCallback<T> action)
Executes the given action within a Redis connection. |
|
|
execute(SessionCallback<T> session)
Executes a Redis session. |
|
Boolean |
expire(K key,
long timeout,
TimeUnit unit)
|
|
Boolean |
expireAt(K key,
Date date)
|
|
Long |
getExpire(K key)
|
|
Boolean |
hasKey(K key)
|
|
Set<K> |
keys(K pattern)
|
|
void |
multi()
' |
|
|
opsForHash()
Returns the operations performed on hash values. |
|
ListOperations<K,V> |
opsForList()
Returns the operations performed on list values. |
|
SetOperations<K,V> |
opsForSet()
Returns the operations performed on set values. |
|
ValueOperations<K,V> |
opsForValue()
Returns the operations performed on simple values (or Strings in Redis terminology). |
|
ZSetOperations<K,V> |
opsForZSet()
Returns the operations performed on zset values (also known as sorted sets). |
|
void |
persist(K key)
|
|
K |
randomKey()
|
|
void |
rename(K oldKey,
K newKey)
|
|
Boolean |
renameIfAbsent(K oldKey,
K newKey)
|
|
List<V> |
sort(K key,
SortParameters params)
|
|
Long |
sort(K key,
SortParameters params,
K destination)
|
|
DataType |
type(K key)
|
|
void |
unwatch()
|
|
void |
watch(Collection<K> keys)
|
Method Detail |
---|
<T> T execute(RedisCallback<T> action)
T
- return typeaction
- callback object that specifies the Redis action
<T> T execute(SessionCallback<T> session)
multi()
and watch(Collection)
operations.
T
- return typesession
- session callback
Boolean hasKey(K key)
void delete(Collection<K> key)
DataType type(K key)
Set<K> keys(K pattern)
K randomKey()
void rename(K oldKey, K newKey)
Boolean renameIfAbsent(K oldKey, K newKey)
Boolean expire(K key, long timeout, TimeUnit unit)
Boolean expireAt(K key, Date date)
void persist(K key)
Long getExpire(K key)
void watch(Collection<K> keys)
void unwatch()
void multi()
void discard()
Object exec()
List<V> sort(K key, SortParameters params)
Long sort(K key, SortParameters params, K destination)
void convertAndSend(String destination, Object message)
ValueOperations<K,V> opsForValue()
BoundValueOperations<K,V> boundValueOps(K key)
key
- Redis key
ListOperations<K,V> opsForList()
BoundListOperations<K,V> boundListOps(K key)
key
- Redis key
SetOperations<K,V> opsForSet()
BoundSetOperations<K,V> boundSetOps(K key)
key
- Redis key
ZSetOperations<K,V> opsForZSet()
BoundZSetOperations<K,V> boundZSetOps(K key)
key
- Redis key
<HK,HV> HashOperations<K,HK,HV> opsForHash()
HK
- hash key (or field) typeHV
- hash value type
<HK,HV> BoundHashOperations<K,HK,HV> boundHashOps(K key)
HK
- hash key (or field) typeHV
- hash value typekey
- Redis key
|
Spring Data Key-Value | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |