|
Spring Data Key-Value | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RedisZSet<E>
Redis ZSet (or sorted set (by weight)). Acts as a SortedSet
based on the given priorities or weights associated with each item.
Comparator
does not apply, a ZSet implements the SortedSet
methods where applicable.
Method Summary | |
---|---|
boolean |
add(E e)
Adds an element to the set with a default score. |
boolean |
add(E e,
double score)
Adds an element to the set with the given score, or updates the score if the element exists. |
E |
first()
Returns the first (lowest) element currently in this sorted set. |
Double |
getDefaultScore()
Returns the default score used by this set. |
RedisZSet<E> |
intersectAndStore(String destKey,
Collection<? extends RedisZSet<?>> sets)
|
E |
last()
Returns the last (highest) element currently in this sorted set. |
Set<E> |
range(long start,
long end)
|
Set<E> |
rangeByScore(double min,
double max)
|
Long |
rank(Object o)
Returns the rank (position) of the given element in the set, in ascending order. |
RedisZSet<E> |
remove(long start,
long end)
|
RedisZSet<E> |
removeByScore(double min,
double max)
|
Set<E> |
reverseRange(long start,
long end)
|
Long |
reverseRank(Object o)
Returns the rank (position) of the given element in the set, in descending order. |
Double |
score(Object o)
Returns the score of the given element. |
RedisZSet<E> |
unionAndStore(String destKey,
Collection<? extends RedisZSet<?>> sets)
|
Methods inherited from interface org.springframework.data.keyvalue.redis.support.collections.RedisStore |
---|
getOperations |
Methods inherited from interface org.springframework.data.keyvalue.redis.core.KeyBound |
---|
getKey |
Methods inherited from interface java.util.Set |
---|
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
---|
RedisZSet<E> intersectAndStore(String destKey, Collection<? extends RedisZSet<?>> sets)
RedisZSet<E> unionAndStore(String destKey, Collection<? extends RedisZSet<?>> sets)
Set<E> range(long start, long end)
Set<E> reverseRange(long start, long end)
Set<E> rangeByScore(double min, double max)
RedisZSet<E> remove(long start, long end)
RedisZSet<E> removeByScore(double min, double max)
boolean add(E e, double score)
e
- element to addscore
- element score
boolean add(E e)
add(e, getDefaultScore())
.
The score value is implementation specific.
add
in interface Collection<E>
add
in interface Set<E>
Double score(Object o)
o
- object
Long rank(Object o)
o
- object
Long reverseRank(Object o)
o
- object
Double getDefaultScore()
E first()
NoSuchElementException
- sorted set is empty.E last()
NoSuchElementException
- sorted set is empty.
|
Spring Data Key-Value | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |