V
- valuepublic interface RScoredSortedSet<V> extends RScoredSortedSetAsync<V>, Iterable<V>, RExpirable, RSortable<Set<V>>
Modifier and Type | Interface and Description |
---|---|
static class |
RScoredSortedSet.Aggregate |
Modifier and Type | Method and Description |
---|---|
boolean |
add(double score,
V object)
Adds element to this set, overrides previous score if it has been already added.
|
Long |
addAll(Map<V,Double> objects) |
Integer |
addAndGetRank(double score,
V object)
Adds element to this set, overrides previous score if it has been already added.
|
Integer |
addAndGetRevRank(double score,
V object)
Adds element to this set, overrides previous score if it has been already added.
|
Double |
addScore(V object,
Number value) |
Integer |
addScoreAndGetRank(V object,
Number value)
Adds score to element and returns its rank
|
Integer |
addScoreAndGetRevRank(V object,
Number value)
Adds score to element and returns its reverse rank
|
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
Long |
count(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive)
Returns the number of elements with a score between
startScore and endScore . |
Collection<ScoredEntry<V>> |
entryRange(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive) |
Collection<ScoredEntry<V>> |
entryRange(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive,
int offset,
int count) |
Collection<ScoredEntry<V>> |
entryRange(int startIndex,
int endIndex) |
Collection<ScoredEntry<V>> |
entryRangeReversed(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive) |
Collection<ScoredEntry<V>> |
entryRangeReversed(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive,
int offset,
int count) |
Collection<ScoredEntry<V>> |
entryRangeReversed(int startIndex,
int endIndex) |
V |
first() |
Double |
firstScore() |
Double |
getScore(V o) |
int |
intersection(Map<String,Double> nameWithWeight)
Intersect provided ScoredSortedSets mapped to weight multiplier
and store result to current ScoredSortedSet
|
int |
intersection(RScoredSortedSet.Aggregate aggregate,
Map<String,Double> nameWithWeight)
Intersect provided ScoredSortedSets mapped to weight multiplier
with defined aggregation method
and store result to current ScoredSortedSet
|
int |
intersection(RScoredSortedSet.Aggregate aggregate,
String... names)
Intersect provided ScoredSortedSets with defined aggregation method
and store result to current ScoredSortedSet
|
int |
intersection(String... names)
Intersect provided ScoredSortedSets
and store result to current ScoredSortedSet
|
boolean |
isEmpty() |
V |
last() |
Double |
lastScore() |
<KOut,VOut> |
mapReduce()
Returns
RMapReduce object associated with this object |
V |
pollFirst() |
V |
pollLast() |
Integer |
rank(V o)
Returns rank of value, with the scores ordered from low to high.
|
Collection<V> |
readAll()
Read all values at once.
|
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
int |
removeRangeByRank(int startIndex,
int endIndex) |
int |
removeRangeByScore(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive) |
boolean |
retainAll(Collection<?> c) |
Integer |
revRank(V o)
Returns rank of value, with the scores ordered from high to low.
|
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
boolean |
tryAdd(double score,
V object)
Adds element to this set only if has not been added before.
|
int |
union(Map<String,Double> nameWithWeight)
Union provided ScoredSortedSets mapped to weight multiplier
and store result to current ScoredSortedSet
|
int |
union(RScoredSortedSet.Aggregate aggregate,
Map<String,Double> nameWithWeight)
Union provided ScoredSortedSets mapped to weight multiplier
with defined aggregation method
and store result to current ScoredSortedSet
|
int |
union(RScoredSortedSet.Aggregate aggregate,
String... names)
Union provided ScoredSortedSets with defined aggregation method
and store result to current ScoredSortedSet
|
int |
union(String... names)
Union provided ScoredSortedSets
and store result to current ScoredSortedSet
|
Collection<V> |
valueRange(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive)
Returns all values between
startScore and endScore . |
Collection<V> |
valueRange(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive,
int offset,
int count) |
Collection<V> |
valueRange(int startIndex,
int endIndex) |
Collection<V> |
valueRangeReversed(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive)
Returns all values between
startScore and endScore in reversed order. |
Collection<V> |
valueRangeReversed(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive,
int offset,
int count) |
Collection<V> |
valueRangeReversed(int startIndex,
int endIndex) |
addAllAsync, addAndGetRankAsync, addAndGetRevRankAsync, addAsync, addScoreAndGetRankAsync, addScoreAndGetRevRankAsync, addScoreAsync, containsAllAsync, containsAsync, countAsync, entryRangeAsync, entryRangeAsync, entryRangeAsync, entryRangeReversedAsync, entryRangeReversedAsync, entryRangeReversedAsync, firstAsync, firstScoreAsync, getScoreAsync, intersectionAsync, intersectionAsync, intersectionAsync, intersectionAsync, lastAsync, lastScoreAsync, pollFirstAsync, pollLastAsync, rankAsync, readAllAsync, removeAllAsync, removeAsync, removeRangeByRankAsync, removeRangeByScoreAsync, retainAllAsync, revRankAsync, sizeAsync, tryAddAsync, unionAsync, unionAsync, unionAsync, unionAsync, valueRangeAsync, valueRangeAsync, valueRangeAsync, valueRangeReversedAsync, valueRangeReversedAsync, valueRangeReversedAsync
forEach, iterator, spliterator
clearExpire, expire, expireAt, expireAt, remainTimeToLive
delete, getCodec, getName, isExists, migrate, move, rename, renamenx, touch, unlink
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
deleteAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, touchAsync, unlinkAsync
readSort, readSort, readSort, readSort, readSort, readSort, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo
readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync
<KOut,VOut> RCollectionMapReduce<V,KOut,VOut> mapReduce()
RMapReduce
object associated with this objectKOut
- output keyVOut
- output valueV pollFirst()
V pollLast()
V first()
V last()
Double firstScore()
Double lastScore()
int removeRangeByScore(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
int removeRangeByRank(int startIndex, int endIndex)
Integer rank(V o)
o
- - objectnull
if value does not existInteger revRank(V o)
o
- - objectnull
if value does not existboolean add(double score, V object)
score
- - object scoreobject
- - object itselftrue
if element has added and false
if not.Integer addAndGetRank(double score, V object)
score
- - object scoreobject
- - object itselfInteger addAndGetRevRank(double score, V object)
score
- - object scoreobject
- - object itselfboolean tryAdd(double score, V object)
Works only with Redis 3.0.2 and higher.
score
- - object scoreobject
- - object itselftrue
if element has added and false
if not.int size()
boolean isEmpty()
boolean contains(Object o)
Object[] toArray()
<T> T[] toArray(T[] a)
boolean remove(Object o)
boolean containsAll(Collection<?> c)
boolean removeAll(Collection<?> c)
boolean retainAll(Collection<?> c)
void clear()
Integer addScoreAndGetRank(V object, Number value)
object
- - object itselfvalue
- - object scoreInteger addScoreAndGetRevRank(V object, Number value)
object
- - object itselfvalue
- - object scoreCollection<V> valueRange(int startIndex, int endIndex)
Collection<V> valueRangeReversed(int startIndex, int endIndex)
Collection<ScoredEntry<V>> entryRange(int startIndex, int endIndex)
Collection<ScoredEntry<V>> entryRangeReversed(int startIndex, int endIndex)
Collection<V> valueRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
startScore
and endScore
.startScore
- - start score.
Use Double.POSITIVE_INFINITY
or Double.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score
Use Double.POSITIVE_INFINITY
or Double.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveCollection<V> valueRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
startScore
and endScore
in reversed order.startScore
- - start score.
Use Double.POSITIVE_INFINITY
or Double.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score
Use Double.POSITIVE_INFINITY
or Double.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveCollection<ScoredEntry<V>> entryRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Collection<V> valueRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Collection<V> valueRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Collection<ScoredEntry<V>> entryRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Collection<ScoredEntry<V>> entryRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Collection<ScoredEntry<V>> entryRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Long count(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
startScore
and endScore
.startScore
- - start scorestartScoreInclusive
- - start score inclusiveendScore
- - end scoreendScoreInclusive
- - end score inclusiveCollection<V> readAll()
int intersection(String... names)
names
- - names of ScoredSortedSetint intersection(RScoredSortedSet.Aggregate aggregate, String... names)
aggregate
- - score aggregation modenames
- - names of ScoredSortedSetint intersection(Map<String,Double> nameWithWeight)
nameWithWeight
- - name of ScoredSortedSet mapped to weight multiplierint intersection(RScoredSortedSet.Aggregate aggregate, Map<String,Double> nameWithWeight)
aggregate
- - score aggregation modenameWithWeight
- - name of ScoredSortedSet mapped to weight multiplierint union(String... names)
names
- - names of ScoredSortedSetint union(RScoredSortedSet.Aggregate aggregate, String... names)
aggregate
- - score aggregation modenames
- - names of ScoredSortedSetint union(Map<String,Double> nameWithWeight)
nameWithWeight
- - name of ScoredSortedSet mapped to weight multiplierint union(RScoredSortedSet.Aggregate aggregate, Map<String,Double> nameWithWeight)
aggregate
- - score aggregation modenameWithWeight
- - name of ScoredSortedSet mapped to weight multiplierCopyright © 2014–2017 The Redisson Project. All rights reserved.