V
- valuepublic interface RScoredSortedSetAsync<V> extends RExpirableAsync, RSortableAsync<Set<V>>
Modifier and Type | Method and Description |
---|---|
RFuture<Integer> |
addAllAsync(Map<V,Double> objects)
Adds all elements contained in the specified map to this sorted set.
|
RFuture<Integer> |
addAndGetRankAsync(double score,
V object)
Adds element to this set, overrides previous score if it has been already added.
|
RFuture<Integer> |
addAndGetRevRankAsync(double score,
V object)
Adds element to this set, overrides previous score if it has been already added.
|
RFuture<Boolean> |
addAsync(double score,
V object)
Adds element to this set, overrides previous score if it has been already added.
|
RFuture<Integer> |
addScoreAndGetRankAsync(V object,
Number value)
Adds score to element and returns its rank
|
RFuture<Integer> |
addScoreAndGetRevRankAsync(V object,
Number value)
Adds score to element and returns its reverse rank
|
RFuture<Double> |
addScoreAsync(V element,
Number value)
Increases score of specified element by value.
|
RFuture<Boolean> |
containsAllAsync(Collection<?> c)
Returns
true if this sorted set contains all of the elements
in encoded state in the specified collection. |
RFuture<Boolean> |
containsAsync(Object o)
Returns
true if this sorted set contains encoded state of the specified element. |
RFuture<Integer> |
countAsync(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive)
Returns the number of elements with a score between
startScore and endScore . |
RFuture<Collection<ScoredEntry<V>>> |
entryRangeAsync(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive)
Returns all entries (value and its score) between
startScore and endScore . |
RFuture<Collection<ScoredEntry<V>>> |
entryRangeAsync(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive,
int offset,
int count)
Returns all entries (value and its score) between
startScore and endScore . |
RFuture<Collection<ScoredEntry<V>>> |
entryRangeAsync(int startIndex,
int endIndex)
Returns entries (value and its score) by rank range.
|
RFuture<Collection<ScoredEntry<V>>> |
entryRangeReversedAsync(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive)
Returns all entries (value and its score) between
startScore and endScore in reversed order. |
RFuture<Collection<ScoredEntry<V>>> |
entryRangeReversedAsync(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive,
int offset,
int count)
Returns all entries (value and its score) between
startScore and endScore in reversed order. |
RFuture<Collection<ScoredEntry<V>>> |
entryRangeReversedAsync(int startIndex,
int endIndex)
Returns entries (value and its score) by rank range in reverse order.
|
RFuture<V> |
firstAsync()
Returns the head element or
null if this sorted set is empty. |
RFuture<Double> |
firstScoreAsync()
Returns score of the head element or returns
null if this sorted set is empty. |
RFuture<Double> |
getScoreAsync(V o)
Returns score of element or
null if it doesn't exist. |
RFuture<Integer> |
intersectionAsync(Map<String,Double> nameWithWeight)
Intersect provided ScoredSortedSets mapped to weight multiplier
and store result to current ScoredSortedSet
|
RFuture<Integer> |
intersectionAsync(RScoredSortedSet.Aggregate aggregate,
Map<String,Double> nameWithWeight)
Intersect provided ScoredSortedSets mapped to weight multiplier
with defined aggregation method
and store result to current ScoredSortedSet
|
RFuture<Integer> |
intersectionAsync(RScoredSortedSet.Aggregate aggregate,
String... names)
Intersect provided ScoredSortedSets with defined aggregation method
and store result to current ScoredSortedSet
|
RFuture<Integer> |
intersectionAsync(String... names)
Intersect provided ScoredSortedSets
and store result to current ScoredSortedSet
|
RFuture<V> |
lastAsync()
Returns the tail element or
null if this sorted set is empty. |
RFuture<Double> |
lastScoreAsync()
Returns score of the tail element or returns
null if this sorted set is empty. |
RFuture<V> |
pollFirstAsync()
Removes and returns the head element or
null if this sorted set is empty. |
RFuture<Collection<V>> |
pollFirstAsync(int count)
Removes and returns the head elements or
null if this sorted set is empty. |
RFuture<V> |
pollFirstAsync(long timeout,
TimeUnit unit)
Removes and returns the head element or
null if this sorted set is empty. |
RFuture<V> |
pollFirstFromAnyAsync(long timeout,
TimeUnit unit,
String... queueNames)
Removes and returns first available head element of any sorted set,
waiting up to the specified wait time if necessary for an element to become available
in any of defined sorted sets including this one.
|
RFuture<V> |
pollLastAsync()
Removes and returns the tail element or
null if this sorted set is empty. |
RFuture<Collection<V>> |
pollLastAsync(int count)
Removes and returns the tail elements or
null if this sorted set is empty. |
RFuture<V> |
pollLastAsync(long timeout,
TimeUnit unit)
Removes and returns the tail element or
null if this sorted set is empty. |
RFuture<V> |
pollLastFromAnyAsync(long timeout,
TimeUnit unit,
String... queueNames)
Removes and returns first available tail element of any sorted set,
waiting up to the specified wait time if necessary for an element to become available
in any of defined sorted sets including this one.
|
RFuture<Integer> |
rankAsync(V o)
Returns rank of value, with the scores ordered from low to high.
|
RFuture<Collection<V>> |
readAllAsync()
Read all values at once.
|
RFuture<Boolean> |
removeAllAsync(Collection<?> c)
Removes all of this sorted set's elements that are also contained in the
specified collection.
|
RFuture<Boolean> |
removeAsync(V o)
Removes a single instance of the specified element from this
sorted set, if it is present.
|
RFuture<Integer> |
removeRangeByRankAsync(int startIndex,
int endIndex)
Removes values by rank range.
|
RFuture<Integer> |
removeRangeByScoreAsync(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive)
Removes values by score range.
|
RFuture<Boolean> |
retainAllAsync(Collection<?> c)
Retains only the elements in this sorted set that are contained in the
specified collection.
|
RFuture<Integer> |
revRankAsync(V o)
Returns rank of value, with the scores ordered from high to low.
|
RFuture<Integer> |
sizeAsync()
Returns size of this set.
|
RFuture<V> |
takeFirstAsync()
Removes and returns the head element waiting if necessary for an element to become available.
|
RFuture<V> |
takeLastAsync()
Removes and returns the tail element waiting if necessary for an element to become available.
|
RFuture<Boolean> |
tryAddAsync(double score,
V object)
Adds element to this set only if has not been added before.
|
RFuture<Integer> |
unionAsync(Map<String,Double> nameWithWeight)
Union provided ScoredSortedSets mapped to weight multiplier
and store result to current ScoredSortedSet
|
RFuture<Integer> |
unionAsync(RScoredSortedSet.Aggregate aggregate,
Map<String,Double> nameWithWeight)
Union provided ScoredSortedSets mapped to weight multiplier
with defined aggregation method
and store result to current ScoredSortedSet
|
RFuture<Integer> |
unionAsync(RScoredSortedSet.Aggregate aggregate,
String... names)
Union provided ScoredSortedSets with defined aggregation method
and store result to current ScoredSortedSet
|
RFuture<Integer> |
unionAsync(String... names)
Union provided ScoredSortedSets
and store result to current ScoredSortedSet
|
RFuture<Collection<V>> |
valueRangeAsync(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive)
Returns all values between
startScore and endScore . |
RFuture<Collection<V>> |
valueRangeAsync(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive,
int offset,
int count)
Returns all values between
startScore and endScore . |
RFuture<Collection<V>> |
valueRangeAsync(int startIndex,
int endIndex)
Returns values by rank range.
|
RFuture<Collection<V>> |
valueRangeReversedAsync(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive)
Returns all values between
startScore and endScore in reversed order. |
RFuture<Collection<V>> |
valueRangeReversedAsync(double startScore,
boolean startScoreInclusive,
double endScore,
boolean endScoreInclusive,
int offset,
int count)
Returns all values between
startScore and endScore in reversed order. |
RFuture<Collection<V>> |
valueRangeReversedAsync(int startIndex,
int endIndex)
Returns values by rank range in reverse order.
|
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
addListenerAsync, copyAsync, deleteAsync, dumpAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync
RFuture<V> pollLastFromAnyAsync(long timeout, TimeUnit unit, String... queueNames)
Requires Redis 5.0.0 and higher.
queueNames
- - names of queuetimeout
- how long to wait before giving up, in units of
unit
unit
- a TimeUnit
determining how to interpret the
timeout
parameternull
if all sorted sets are emptyRFuture<V> pollFirstFromAnyAsync(long timeout, TimeUnit unit, String... queueNames)
Requires Redis 5.0.0 and higher.
queueNames
- - names of queuetimeout
- how long to wait before giving up, in units of
unit
unit
- a TimeUnit
determining how to interpret the
timeout
parameternull
if all sorted sets are emptyRFuture<V> pollFirstAsync(long timeout, TimeUnit unit)
null
if this sorted set is empty.
Requires Redis 5.0.0 and higher.
timeout
- how long to wait before giving up, in units of
unit
unit
- a TimeUnit
determining how to interpret the
timeout
parameternull
if this sorted set is emptyRFuture<V> takeFirstAsync()
RFuture<V> takeLastAsync()
RFuture<V> pollLastAsync(long timeout, TimeUnit unit)
null
if this sorted set is empty.
Requires Redis 5.0.0 and higher.
timeout
- how long to wait before giving up, in units of
unit
unit
- a TimeUnit
determining how to interpret the
timeout
parameternull
if this sorted set is emptyRFuture<Collection<V>> pollFirstAsync(int count)
null
if this sorted set is empty.count
- - elements amountRFuture<Collection<V>> pollLastAsync(int count)
null
if this sorted set is empty.count
- - elements amountRFuture<V> pollFirstAsync()
null
if this sorted set is empty.null
if this sorted set is emptyRFuture<V> pollLastAsync()
null
if this sorted set is empty.null
if this sorted set is emptyRFuture<V> firstAsync()
null
if this sorted set is empty.null
if this sorted set is emptyRFuture<V> lastAsync()
null
if this sorted set is empty.null
if this sorted set is emptyRFuture<Double> firstScoreAsync()
null
if this sorted set is empty.null
if this sorted set is emptyRFuture<Double> lastScoreAsync()
null
if this sorted set is empty.null
if this sorted set is emptyRFuture<Integer> addAllAsync(Map<V,Double> objects)
objects
- - map of elements to addRFuture<Integer> removeRangeByScoreAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
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 inclusiveRFuture<Integer> removeRangeByRankAsync(int startIndex, int endIndex)
-1
means the highest score, -2
means the second highest score.startIndex
- - start indexendIndex
- - end indexRFuture<Integer> rankAsync(V o)
o
- - objectnull
if value does not existRFuture<Integer> revRankAsync(V o)
o
- - objectnull
if value does not existRFuture<Double> getScoreAsync(V o)
null
if it doesn't exist.o
- - elementRFuture<Boolean> addAsync(double score, V object)
score
- - object scoreobject
- - object itselftrue
if element has added and false
if not.RFuture<Integer> addAndGetRankAsync(double score, V object)
score
- - object scoreobject
- - object itselfRFuture<Integer> addAndGetRevRankAsync(double score, V object)
score
- - object scoreobject
- - object itselfRFuture<Boolean> tryAddAsync(double score, V object)
Requires Redis 3.0.2 and higher.
score
- - object scoreobject
- - object itselftrue
if element has added and false
if not.RFuture<Boolean> removeAsync(V o)
o
- element to be removed from this sorted set, if presenttrue
if an element was removed as a result of this callRFuture<Boolean> containsAsync(Object o)
true
if this sorted set contains encoded state of the specified element.o
- element whose presence in this collection is to be testedtrue
if this sorted set contains the specified
element and false
otherwiseRFuture<Boolean> containsAllAsync(Collection<?> c)
true
if this sorted set contains all of the elements
in encoded state in the specified collection.c
- collection to be checked for containment in this sorted settrue
if this sorted set contains all of the elements
in the specified collectionRFuture<Boolean> removeAllAsync(Collection<?> c)
c
- sorted set containing elements to be removed from this collectiontrue
if this sorted set changed as a result of the
callRFuture<Boolean> retainAllAsync(Collection<?> c)
c
- collection containing elements to be retained in this collectiontrue
if this sorted set changed as a result of the callRFuture<Double> addScoreAsync(V element, Number value)
element
- - element whose score needs to be increasedvalue
- - valueRFuture<Integer> addScoreAndGetRevRankAsync(V object, Number value)
object
- - object itselfvalue
- - object scoreRFuture<Integer> addScoreAndGetRankAsync(V object, Number value)
object
- - object itselfvalue
- - object scoreRFuture<Collection<V>> valueRangeAsync(int startIndex, int endIndex)
-1
means the highest score, -2
means the second highest score.startIndex
- - start indexendIndex
- - end indexRFuture<Collection<V>> valueRangeReversedAsync(int startIndex, int endIndex)
-1
means the highest score, -2
means the second highest score.startIndex
- - start indexendIndex
- - end indexRFuture<Collection<ScoredEntry<V>>> entryRangeAsync(int startIndex, int endIndex)
-1
means the highest score, -2
means the second highest score.startIndex
- - start indexendIndex
- - end indexRFuture<Collection<ScoredEntry<V>>> entryRangeReversedAsync(int startIndex, int endIndex)
-1
means the highest score, -2
means the second highest score.startIndex
- - start indexendIndex
- - end indexRFuture<Collection<V>> valueRangeAsync(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 inclusiveRFuture<Collection<V>> valueRangeReversedAsync(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 inclusiveRFuture<Collection<ScoredEntry<V>>> entryRangeAsync(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 inclusiveRFuture<Collection<V>> valueRangeAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
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 inclusiveoffset
- - offset of sorted datacount
- - amount of sorted dataRFuture<Collection<V>> valueRangeReversedAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
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 inclusiveoffset
- - offset of sorted datacount
- - amount of sorted dataRFuture<Collection<ScoredEntry<V>>> entryRangeAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
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 inclusiveoffset
- - offset of sorted datacount
- - amount of sorted dataRFuture<Collection<ScoredEntry<V>>> entryRangeReversedAsync(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 inclusiveRFuture<Collection<ScoredEntry<V>>> entryRangeReversedAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
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 inclusiveoffset
- - offset of sorted datacount
- - amount of sorted dataRFuture<Integer> countAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
startScore
and endScore
.startScore
- - start scorestartScoreInclusive
- - start score inclusiveendScore
- - end scoreendScoreInclusive
- - end score inclusiveRFuture<Collection<V>> readAllAsync()
RFuture<Integer> intersectionAsync(String... names)
names
- - names of ScoredSortedSetRFuture<Integer> intersectionAsync(RScoredSortedSet.Aggregate aggregate, String... names)
aggregate
- - score aggregation modenames
- - names of ScoredSortedSetRFuture<Integer> intersectionAsync(Map<String,Double> nameWithWeight)
nameWithWeight
- - name of ScoredSortedSet mapped to weight multiplierRFuture<Integer> intersectionAsync(RScoredSortedSet.Aggregate aggregate, Map<String,Double> nameWithWeight)
aggregate
- - score aggregation modenameWithWeight
- - name of ScoredSortedSet mapped to weight multiplierRFuture<Integer> unionAsync(String... names)
names
- - names of ScoredSortedSetRFuture<Integer> unionAsync(RScoredSortedSet.Aggregate aggregate, String... names)
aggregate
- - score aggregation modenames
- - names of ScoredSortedSetRFuture<Integer> unionAsync(Map<String,Double> nameWithWeight)
nameWithWeight
- - name of ScoredSortedSet mapped to weight multiplierRFuture<Integer> unionAsync(RScoredSortedSet.Aggregate aggregate, Map<String,Double> nameWithWeight)
aggregate
- - score aggregation modenameWithWeight
- - name of ScoredSortedSet mapped to weight multiplierCopyright © 2014–2019 The Redisson Project. All rights reserved.