Class RedissonScoredSortedSet<V>
-
- org.redisson.RedissonObject
-
- org.redisson.RedissonScoredSortedSet<V>
-
- Type Parameters:
V
- value type
- All Implemented Interfaces:
<V>
,<V>>
,<V>>
- Direct Known Subclasses:
RedissonGeo
,RedissonLexSortedSet
public class RedissonScoredSortedSet<V> extends RedissonObject implements RScoredSortedSet<V>
- Author:
- Nikita Koksharov
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.redisson.api.RScoredSortedSet
RScoredSortedSet.Aggregate
-
-
Field Summary
-
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name
-
-
Constructor Summary
Constructors Constructor Description RedissonScoredSortedSet(Codec codec, CommandAsyncExecutor commandExecutor, name, RedissonClient redisson)
RedissonScoredSortedSet(CommandAsyncExecutor commandExecutor, name, RedissonClient redisson)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(double score, V object)
Adds element to this set, overrides previous score if it has been already added.int
<> objects)
Adds all elements contained in the specified map to this sorted set.>
<> objects)
Adds all elements contained in the specified map to this sorted set.addAndGetRank(double score, V object)
Adds element to this set, overrides previous score if it has been already added.>
addAndGetRankAsync(double score, V object)
Adds element to this set, overrides previous score if it has been already added.addAndGetRevRank(double score, V object)
Adds element to this set, overrides previous score if it has been already added.<>
<? extends > map)
Adds elements to this set, overrides previous score if it has been already added.>
addAndGetRevRankAsync(double score, V object)
Adds element to this set, overrides previous score if it has been already added.<>>
<? extends > map)
Adds elements to this set, overrides previous score if it has been already added.>
addAsync(double score, V object)
Adds element to this set, overrides previous score if it has been already added.boolean
addIfExists(double score, V object)
Adds element to this set only if it's already exists.>
addIfExistsAsync(double score, V object)
Adds element to this set only if it's already exists.boolean
addIfGreater(double score, V object)
Adds element to this set only if new score greater than current score of existed element.>
addIfGreaterAsync(double score, V object)
Adds element to this set only if new score greater than current score of existed element.boolean
addIfLess(double score, V object)
Adds element to this set only if new score less than current score of existed element.>
addIfLessAsync(double score, V object)
Adds element to this set only if new score less than current score of existed element.int
addListener(ObjectListener listener)
Adds object event listener>
addListenerAsync(ObjectListener listener)
Adds object event listeneraddScore(V object, value)
Increases score of specified element by value.addScoreAndGetRank(V object, value)
Adds score to element and returns its rank>
addScoreAndGetRankAsync(V object, value)
Adds score to element and returns its rankaddScoreAndGetRevRank(V object, value)
Adds score to element and returns its reverse rank>
addScoreAndGetRevRankAsync(V object, value)
Adds score to element and returns its reverse rank>
addScoreAsync(V object, value)
Increases score of specified element by value.void
clear()
Removes all elements of this sorted set.boolean
clearExpire()
Clear an expire timeout or expire date for object.>
clearExpireAsync()
Clear an expire timeout or expire date for object in async mode.protected >
... keys)
boolean
object)
Returnstrue
if this sorted set contains encoded state of the specified element.boolean
<?> c)
Returnstrue
if this sorted set contains all of the elements in encoded state in the specified collection.>
<?> c)
Returnstrue
if this sorted set contains all of the elements in encoded state in the specified collection.>
o)
Returnstrue
if this sorted set contains encoded state of the specified element.int
count(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Returns the number of elements with a score betweenstartScore
andendScore
.>
countAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Returns the number of elements with a score betweenstartScore
andendScore
.int
... names)
Diff provided ScoredSortedSets and store result to current ScoredSortedSet>
... names)
Diff provided ScoredSortedSets and store result to current ScoredSortedSet<ScoredEntry<V>>
entryRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Returns all entries (value and its score) betweenstartScore
andendScore
.<ScoredEntry<V>>
entryRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Returns all entries (value and its score) betweenstartScore
andendScore
.<ScoredEntry<V>>
entryRange(int startIndex, int endIndex)
Returns entries (value and its score) by rank range.<ScoredEntry<V>>>
entryRangeAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Returns all entries (value and its score) betweenstartScore
andendScore
.<ScoredEntry<V>>>
entryRangeAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Returns all entries (value and its score) betweenstartScore
andendScore
.<ScoredEntry<V>>>
entryRangeAsync(int startIndex, int endIndex)
Returns entries (value and its score) by rank range.<ScoredEntry<V>>
entryRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Returns all entries (value and its score) betweenstartScore
andendScore
in reversed order.<ScoredEntry<V>>
entryRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Returns all entries (value and its score) betweenstartScore
andendScore
in reversed order.<ScoredEntry<V>>
entryRangeReversed(int startIndex, int endIndex)
Returns entries (value and its score) by rank range in reverse order.<ScoredEntry<V>>>
entryRangeReversedAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Returns all entries (value and its score) betweenstartScore
andendScore
in reversed order.<ScoredEntry<V>>>
entryRangeReversedAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Returns all entries (value and its score) betweenstartScore
andendScore
in reversed order.<ScoredEntry<V>>>
entryRangeReversedAsync(int startIndex, int endIndex)
Returns entries (value and its score) by rank range in reverse order.boolean
expire(long timeToLive, timeUnit)
Set a timeout for object.boolean
instant)
Set an expire date for object.>
expireAsync(long timeToLive, timeUnit)
Set a timeout for object in async mode.protected >
expireAsync(long timeToLive, timeUnit, ... keys)
>
instant)
Set an expire date for object.boolean
expireAt(long timestamp)
UseRExpirable.expire(Instant)
insteadboolean
timestamp)
UseRExpirable.expire(Instant)
instead>
expireAtAsync(long timestamp)
UseRExpirableAsync.expireAsync(Instant)
insteadprotected >
expireAtAsync(long timestamp, ... keys)
>
timestamp)
UseRExpirableAsync.expireAsync(Instant)
insteadV
first()
Returns the head element ornull
if this sorted set is empty.RFuture<V>
firstAsync()
Returns the head element ornull
if this sorted set is empty.firstScore()
Returns score of the tail element or returnsnull
if this sorted set is empty.>
firstScoreAsync()
Returns score of the head element or returnsnull
if this sorted set is empty.<>
<V> keys)
Returns scores of elements.getScore(V o)
Returns score of element ornull
if it doesn't exist.<>>
<V> elements)
Returns scores of elements.>
getScoreAsync(V o)
Returns score of element ornull
if it doesn't exist.int
... names)
Intersect provided ScoredSortedSets and store result to current ScoredSortedSetint
<,> nameWithWeight)
Intersect provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSetint
intersection(RScoredSortedSet.Aggregate aggregate, ... names)
Intersect provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSetint
intersection(RScoredSortedSet.Aggregate aggregate, <,> nameWithWeight)
Intersect provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSet>
... names)
Intersect provided ScoredSortedSets and store result to current ScoredSortedSet>
<,> nameWithWeight)
Intersect provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSet>
intersectionAsync(RScoredSortedSet.Aggregate aggregate, ... names)
Intersect provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSet>
intersectionAsync(RScoredSortedSet.Aggregate aggregate, <,> nameWithWeight)
Intersect provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSetboolean
isEmpty()
Returnstrue
if this set is empty<V>
iterator()
<V>
iterator(int count)
Returns an iterator over elements in this set.<V>
pattern)
Returns an iterator over elements in this set.<V>
pattern, int count)
Returns an iterator over elements in this set.V
last()
Returns the tail element ornull
if this sorted set is empty.RFuture<V>
lastAsync()
Returns the tail element ornull
if this sorted set is empty.lastScore()
Returns score of the head element or returnsnull
if this sorted set is empty.>
lastScoreAsync()
Returns score of the tail element or returnsnull
if this sorted set is empty.<KOut,VOut>
RCollectionMapReduce<V,KOut,VOut>mapReduce()
ReturnsRMapReduce
object associated with this objectV
pollFirst()
Removes and returns the head element ornull
if this sorted set is empty.<V>
pollFirst(int count)
Removes and returns the head elements of this sorted set.V
pollFirst(long timeout, unit)
Removes and returns the head element ornull
if this sorted set is empty.RFuture<V>
pollFirstAsync()
Removes and returns the head element ornull
if this sorted set is empty.<V>>
pollFirstAsync(int count)
Removes and returns the head elements of this sorted set.RFuture<V>
pollFirstAsync(long timeout, unit)
Removes and returns the head element ornull
if this sorted set is empty.V
pollFirstFromAny(long timeout, unit, ... 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>
pollFirstFromAnyAsync(long timeout, unit, ... 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.V
pollLast()
Removes and returns the tail element ornull
if this sorted set is empty.<V>
pollLast(int count)
Removes and returns the tail elements of this sorted set.V
pollLast(long timeout, unit)
Removes and returns the tail element ornull
if this sorted set is empty.RFuture<V>
pollLastAsync()
Removes and returns the tail element ornull
if this sorted set is empty.<V>>
pollLastAsync(int count)
Removes and returns the tail elements of this sorted set.RFuture<V>
pollLastAsync(long timeout, unit)
Removes and returns the tail element ornull
if this sorted set is empty.V
pollLastFromAny(long timeout, unit, ... 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<V>
pollLastFromAnyAsync(long timeout, unit, ... 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.V
random()
Returns random element from this sorted set<V>
random(int count)
Returns random elements from this sorted set limited bycount
RFuture<V>
randomAsync()
Returns random element from this sorted set<V>>
randomAsync(int count)
Returns random elements from this sorted set limited bycount
<>
randomEntries(int count)
Returns random entries from this sorted set limited bycount
.<>>
randomEntriesAsync(int count)
Returns random entries from this sorted set limited bycount
.int
destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Stores to defined ScoredSortedSet values betweenstartScore
andendScore
.int
destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Stores to defined ScoredSortedSet values betweenstartScore
andendScore
.int
destName, int startIndex, int endIndex)
Stores to defined ScoredSortedSet values by rank range.>
destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Stores to defined ScoredSortedSet values betweenstartScore
andendScore
.>
destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Stores to defined ScoredSortedSet values betweenstartScore
andendScore
.>
destName, int startIndex, int endIndex)
Stores to defined ScoredSortedSet values by rank range.rank(V o)
Returns rank of value, with the scores ordered from low to high.>
rankAsync(V o)
Returns rank of value, with the scores ordered from low to high.<V>
readAll()
Read all values at once.<V>>
readAllAsync()
Read all values at once.<V>
... names)
Diff ScoredSortedSets specified by name with current ScoredSortedSet without state change.<V>>
... names)
Diff ScoredSortedSets specified by name with current ScoredSortedSet without state change.<V>
... names)
Intersect provided ScoredSortedSets with current ScoredSortedSet without state change<V>
<,> nameWithWeight)
Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet without state change<V>
readIntersection(RScoredSortedSet.Aggregate aggregate, ... names)
Intersect provided ScoredSortedSets with current ScoredSortedSet using defined aggregation method without state change<V>
readIntersection(RScoredSortedSet.Aggregate aggregate, <,> nameWithWeight)
Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet using defined aggregation method without state change<V>>
... names)
Intersect provided ScoredSortedSets with current ScoredSortedSet without state change<V>>
<,> nameWithWeight)
Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet without state change<V>>
readIntersectionAsync(RScoredSortedSet.Aggregate aggregate, ... names)
Intersect provided ScoredSortedSets with current ScoredSortedSet using defined aggregation method without state change<V>>
readIntersectionAsync(RScoredSortedSet.Aggregate aggregate, <,> nameWithWeight)
Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet using defined aggregation method without state change<T> <T>
byPattern, <> getPatterns, SortOrder order)
Read data in sorted view<T> <T>
byPattern, <> getPatterns, SortOrder order, int offset, int count)
Read data in sorted view<V>
byPattern, SortOrder order)
Read data in sorted view<V>
byPattern, SortOrder order, int offset, int count)
Read data in sorted view<V>
readSort(SortOrder order)
Read data in sorted view<V>
readSort(SortOrder order, int offset, int count)
Read data in sorted view<T> <T>
byPattern, <> getPatterns, SortOrder order)
Read data in sorted view lexicographically<T> <T>
byPattern, <> getPatterns, SortOrder order, int offset, int count)
Read data in sorted view lexicographically<V>
byPattern, SortOrder order)
Read data in sorted view lexicographically<V>
byPattern, SortOrder order, int offset, int count)
Read data in sorted view lexicographically<V>
readSortAlpha(SortOrder order)
Read data in sorted view lexicographically<V>
readSortAlpha(SortOrder order, int offset, int count)
Read data in sorted view lexicographically<T> <T>>
byPattern, <> getPatterns, SortOrder order)
Read data in sorted view lexicographically<T> <T>>
byPattern, <> getPatterns, SortOrder order, int offset, int count)
Read data in sorted view lexicographically<V>>
byPattern, SortOrder order)
Read data in sorted view lexicographically<V>>
byPattern, SortOrder order, int offset, int count)
Read data in sorted view lexicographically<V>>
readSortAlphaAsync(SortOrder order)
Read data in sorted view lexicographically<V>>
readSortAlphaAsync(SortOrder order, int offset, int count)
Read data in sorted view lexicographically<T> <T>>
byPattern, <> getPatterns, SortOrder order)
Read data in sorted view<T> <T>>
byPattern, <> getPatterns, SortOrder order, int offset, int count)
Read data in sorted view<V>>
byPattern, SortOrder order)
Read data in sorted view<V>>
byPattern, SortOrder order, int offset, int count)
Read data in sorted view<V>>
readSortAsync(SortOrder order)
Read data in sorted view<V>>
readSortAsync(SortOrder order, int offset, int count)
Read data in sorted view<V>
... names)
Union ScoredSortedSets specified by name with current ScoredSortedSet without state change.<V>
<,> nameWithWeight)
Union provided ScoredSortedSets mapped to weight multiplier and current ScoredSortedSet without state change.<V>
readUnion(RScoredSortedSet.Aggregate aggregate, ... names)
Union ScoredSortedSets specified by name with defined aggregation method and current ScoredSortedSet without state change.<V>
readUnion(RScoredSortedSet.Aggregate aggregate, <,> nameWithWeight)
Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and current ScoredSortedSet without state change<V>>
... names)
Union ScoredSortedSets specified by name with current ScoredSortedSet without state change.<V>>
<,> nameWithWeight)
Union provided ScoredSortedSets mapped to weight multiplier and current ScoredSortedSet without state change.<V>>
readUnionAsync(RScoredSortedSet.Aggregate aggregate, ... names)
Union ScoredSortedSets specified by name with defined aggregation method and current ScoredSortedSet without state change.<V>>
readUnionAsync(RScoredSortedSet.Aggregate aggregate, <,> nameWithWeight)
Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and current ScoredSortedSet without state changelong
remainTimeToLive()
Remaining time to live of Redisson object that has a timeout>
remainTimeToLiveAsync()
Remaining time to live of Redisson object that has a timeoutboolean
object)
Removes a single instance of the specified element from this sorted set, if it is present.boolean
<?> c)
Removes all of this sorted set's elements that are also contained in the specified collection.>
<?> c)
Removes all of this sorted set's elements that are also contained in the specified collection.>
object)
Removes a single instance of the specified element from this sorted set, if it is present.void
removeListener(int listenerId)
Removes object event listener>
removeListenerAsync(int listenerId)
Removes object event listenerint
removeRangeByRank(int startIndex, int endIndex)
Removes values by rank range.>
removeRangeByRankAsync(int startIndex, int endIndex)
Removes values by rank range.int
removeRangeByScore(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Removes values by score range.>
removeRangeByScoreAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Removes values by score range.boolean
<?> c)
Retains only the elements in this sorted set that are contained in the specified collection.>
<?> c)
Retains only the elements in this sorted set that are contained in the specified collection.int
destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Stores to defined ScoredSortedSet values in reversed order betweenstartScore
andendScore
.int
destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Stores to defined ScoredSortedSet values in reversed order betweenstartScore
andendScore
.int
destName, int startIndex, int endIndex)
Stores to defined ScoredSortedSet values in reversed order by rank range.>
destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Stores to defined ScoredSortedSet values in reversed order betweenstartScore
andendScore
.>
destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Stores to defined ScoredSortedSet values in reversed order betweenstartScore
andendScore
.>
destName, int startIndex, int endIndex)
Stores to defined ScoredSortedSet values in reversed order by rank range.<>
<V> elements)
Returns ranks of elements, with the scores ordered from high to low.revRank(V o)
Returns rank of value, with the scores ordered from high to low.<>>
<V> elements)
Returns ranks of elements, with the scores ordered from high to low.>
revRankAsync(V o)
Returns rank of value, with the scores ordered from high to low.>>
scanIteratorAsync(RedisClient client, long startPos, pattern, int count)
int
size()
Returns size of this set.>
sizeAsync()
Returns size of this set.int
destName, byPattern, <> getPatterns, SortOrder order)
Sort data and store todestName
listint
destName, byPattern, <> getPatterns, SortOrder order, int offset, int count)
Sort data and store todestName
listint
destName, byPattern, SortOrder order)
Sort data and store todestName
listint
destName, byPattern, SortOrder order, int offset, int count)
Sort data and store todestName
listint
destName, SortOrder order)
Sort data and store todestName
listint
destName, SortOrder order, int offset, int count)
Sort data and store todestName
list>
destName, byPattern, <> getPatterns, SortOrder order)
Sort data and store todestName
list>
destName, byPattern, <> getPatterns, SortOrder order, int offset, int count)
Sort data and store todestName
list>
destName, byPattern, SortOrder order)
Sort data and store todestName
list>
destName, byPattern, SortOrder order, int offset, int count)
Sort data and store todestName
list>
destName, SortOrder order)
Sort data and store todestName
list>
destName, SortOrder order, int offset, int count)
Sort data and store todestName
list<V>
stream()
Returns stream of elements in this set.<V>
stream(int count)
Returns stream of elements in this set.<V>
pattern)
Returns stream of elements in this set.<V>
pattern, int count)
Returns stream of elements in this set.int
<V> consumer)
Subscribes on first elements appeared in this set.int
<V> consumer)
Subscribes on last elements appeared in this set.V
takeFirst()
Removes and returns the head element waiting if necessary for an element to become available.RFuture<V>
takeFirstAsync()
Removes and returns the head element waiting if necessary for an element to become available.V
takeLast()
Removes and returns the tail 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.[]
toArray()
Returns this sorted set in array of Object type.<T> T[]
toArray(T[] a)
Returns this sorted set in array of defined type.boolean
tryAdd(double score, V object)
Adds element to this set only if has not been added before.>
tryAddAsync(double score, V object)
Adds element to this set only if has not been added before.int
... names)
Union provided ScoredSortedSets and store result to current ScoredSortedSetint
<,> nameWithWeight)
Union provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSetint
union(RScoredSortedSet.Aggregate aggregate, ... names)
Union provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSetint
union(RScoredSortedSet.Aggregate aggregate, <,> nameWithWeight)
Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSet>
... names)
Union provided ScoredSortedSets and store result to current ScoredSortedSet>
<,> nameWithWeight)
Union provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSet>
unionAsync(RScoredSortedSet.Aggregate aggregate, ... names)
Union provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSet>
unionAsync(RScoredSortedSet.Aggregate aggregate, <,> nameWithWeight)
Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSetvoid
unsubscribe(int listenerId)
Un-subscribes defined listener.<V>
valueRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Returns all values betweenstartScore
andendScore
.<V>
valueRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Returns all values betweenstartScore
andendScore
.<V>
valueRange(int startIndex, int endIndex)
Returns values by rank range.<V>>
valueRangeAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Returns all values betweenstartScore
andendScore
.<V>>
valueRangeAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Returns all values betweenstartScore
andendScore
.<V>>
valueRangeAsync(int startIndex, int endIndex)
Returns values by rank range.<V>
valueRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Returns all values betweenstartScore
andendScore
in reversed order.<V>
valueRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Returns all values betweenstartScore
andendScore
in reversed order.<V>
valueRangeReversed(int startIndex, int endIndex)
Returns values by rank range in reverse order.<V>>
valueRangeReversedAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Returns all values betweenstartScore
andendScore
in reversed order.<V>>
valueRangeReversedAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Returns all values betweenstartScore
andendScore
in reversed order.<V>>
valueRangeReversedAsync(int startIndex, int endIndex)
Returns values by rank range in reverse order.-
Methods inherited from class org.redisson.RedissonObject
addListener, addListenerAsync, copy, copyAsync, delete, deleteAsync, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsync
-
Methods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObject
copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
Methods inherited from interface org.redisson.api.RObjectAsync
copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
-
-
-
Constructor Detail
-
RedissonScoredSortedSet
public RedissonScoredSortedSet(CommandAsyncExecutor commandExecutor, name, RedissonClient redisson)
-
RedissonScoredSortedSet
public RedissonScoredSortedSet(Codec codec, CommandAsyncExecutor commandExecutor, name, RedissonClient redisson)
-
-
Method Detail
-
mapReduce
public <KOut,VOut> RCollectionMapReduce<V,KOut,VOut> mapReduce()
Description copied from interface:RScoredSortedSet
ReturnsRMapReduce
object associated with this object- Specified by:
mapReduce
in interfaceRScoredSortedSet<V>
- Type Parameters:
KOut
- output keyVOut
- output value- Returns:
- MapReduce instance
-
readAll
public <V> readAll()
Description copied from interface:RScoredSortedSet
Read all values at once.- Specified by:
readAll
in interfaceRScoredSortedSet<V>
- Returns:
- values
-
readAllAsync
public <V>> readAllAsync()
Description copied from interface:RScoredSortedSetAsync
Read all values at once.- Specified by:
readAllAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- values
-
pollFirst
public V pollFirst()
Description copied from interface:RScoredSortedSet
Removes and returns the head element ornull
if this sorted set is empty.- Specified by:
pollFirst
in interfaceRScoredSortedSet<V>
- Returns:
- the head element,
or
null
if this sorted set is empty
-
pollLast
public V pollLast()
Description copied from interface:RScoredSortedSet
Removes and returns the tail element ornull
if this sorted set is empty.- Specified by:
pollLast
in interfaceRScoredSortedSet<V>
- Returns:
- the tail element or
null
if this sorted set is empty
-
pollFirst
public <V> pollFirst(int count)
Description copied from interface:RScoredSortedSet
Removes and returns the head elements of this sorted set.- Specified by:
pollFirst
in interfaceRScoredSortedSet<V>
- Parameters:
count
- - elements amount- Returns:
- the head elements of this sorted set
-
pollLast
public <V> pollLast(int count)
Description copied from interface:RScoredSortedSet
Removes and returns the tail elements of this sorted set.- Specified by:
pollLast
in interfaceRScoredSortedSet<V>
- Parameters:
count
- - elements amount- Returns:
- the tail elements of this sorted set
-
pollFirstAsync
public <V>> pollFirstAsync(int count)
Description copied from interface:RScoredSortedSetAsync
Removes and returns the head elements of this sorted set.- Specified by:
pollFirstAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
count
- - elements amount- Returns:
- the head elements of this sorted set
-
pollLastAsync
public <V>> pollLastAsync(int count)
Description copied from interface:RScoredSortedSetAsync
Removes and returns the tail elements of this sorted set.- Specified by:
pollLastAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
count
- - elements amount- Returns:
- the tail elements of this sorted set
-
pollFirstAsync
public RFuture<V> pollFirstAsync()
Description copied from interface:RScoredSortedSetAsync
Removes and returns the head element ornull
if this sorted set is empty.- Specified by:
pollFirstAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- the head element,
or
null
if this sorted set is empty
-
pollLastAsync
public RFuture<V> pollLastAsync()
Description copied from interface:RScoredSortedSetAsync
Removes and returns the tail element ornull
if this sorted set is empty.- Specified by:
pollLastAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- the tail element or
null
if this sorted set is empty
-
pollFirst
public V pollFirst(long timeout, unit)
Description copied from interface:RScoredSortedSet
Removes and returns the head element ornull
if this sorted set is empty.- Specified by:
pollFirst
in interfaceRScoredSortedSet<V>
- Parameters:
timeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameter- Returns:
- the head element,
or
null
if this sorted set is empty
-
pollFirstAsync
public RFuture<V> pollFirstAsync(long timeout, unit)
Description copied from interface:RScoredSortedSetAsync
Removes and returns the head element ornull
if this sorted set is empty.Requires Redis 5.0.0 and higher.
- Specified by:
pollFirstAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
timeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameter- Returns:
- the head element,
or
null
if this sorted set is empty
-
pollFirstFromAny
public V pollFirstFromAny(long timeout, unit, ... queueNames)
Description copied from interface:RScoredSortedSet
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.Requires Redis 5.0.0 and higher.
- Specified by:
pollFirstFromAny
in interfaceRScoredSortedSet<V>
- Parameters:
timeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameterqueueNames
- - names of queue- Returns:
- the head element, or
null
if all sorted sets are empty
-
pollFirstFromAnyAsync
public RFuture<V> pollFirstFromAnyAsync(long timeout, unit, ... queueNames)
Description copied from interface:RScoredSortedSetAsync
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.Requires Redis 5.0.0 and higher.
- Specified by:
pollFirstFromAnyAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
timeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameterqueueNames
- - names of queue- Returns:
- the head element, or
null
if all sorted sets are empty
-
pollLastFromAny
public V pollLastFromAny(long timeout, unit, ... queueNames)
Description copied from interface:RScoredSortedSet
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.Requires Redis 5.0.0 and higher.
- Specified by:
pollLastFromAny
in interfaceRScoredSortedSet<V>
- Parameters:
timeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameterqueueNames
- - names of queue- Returns:
- the tail element, or
null
if all sorted sets are empty
-
pollLastFromAnyAsync
public RFuture<V> pollLastFromAnyAsync(long timeout, unit, ... queueNames)
Description copied from interface:RScoredSortedSetAsync
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.Requires Redis 5.0.0 and higher.
- Specified by:
pollLastFromAnyAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
timeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameterqueueNames
- - names of queue- Returns:
- the tail element, or
null
if all sorted sets are empty
-
pollLast
public V pollLast(long timeout, unit)
Description copied from interface:RScoredSortedSet
Removes and returns the tail element ornull
if this sorted set is empty.- Specified by:
pollLast
in interfaceRScoredSortedSet<V>
- Parameters:
timeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameter- Returns:
- the tail element or
null
if this sorted set is empty
-
pollLastAsync
public RFuture<V> pollLastAsync(long timeout, unit)
Description copied from interface:RScoredSortedSetAsync
Removes and returns the tail element ornull
if this sorted set is empty.Requires Redis 5.0.0 and higher.
- Specified by:
pollLastAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
timeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameter- Returns:
- the tail element or
null
if this sorted set is empty
-
random
public V random()
Description copied from interface:RScoredSortedSet
Returns random element from this sorted setRequires Redis 6.2.0 and higher.
- Specified by:
random
in interfaceRScoredSortedSet<V>
- Returns:
- random element
-
random
public <V> random(int count)
Description copied from interface:RScoredSortedSet
Returns random elements from this sorted set limited bycount
Requires Redis 6.2.0 and higher.
- Specified by:
random
in interfaceRScoredSortedSet<V>
- Parameters:
count
- - values amount to return- Returns:
- random elements
-
randomAsync
public RFuture<V> randomAsync()
Description copied from interface:RScoredSortedSetAsync
Returns random element from this sorted setRequires Redis 6.2.0 and higher.
- Specified by:
randomAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- value
-
randomAsync
public <V>> randomAsync(int count)
Description copied from interface:RScoredSortedSetAsync
Returns random elements from this sorted set limited bycount
Requires Redis 6.2.0 and higher.
- Specified by:
randomAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
count
- - values amount to return- Returns:
- value
-
randomEntries
public <> randomEntries(int count)
Description copied from interface:RScoredSortedSet
Returns random entries from this sorted set limited bycount
. Each map entry uses element as key and score as value.Requires Redis 6.2.0 and higher.
- Specified by:
randomEntries
in interfaceRScoredSortedSet<V>
- Parameters:
count
- - entries amount to return- Returns:
- random entries
-
randomEntriesAsync
public <>> randomEntriesAsync(int count)
Description copied from interface:RScoredSortedSetAsync
Returns random entries from this sorted set limited bycount
. Each map entry uses element as key and score as value.Requires Redis 6.2.0 and higher.
- Specified by:
randomEntriesAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
count
- - entries amount to return- Returns:
- random entries
-
add
public boolean add(double score, V object)
Description copied from interface:RScoredSortedSet
Adds element to this set, overrides previous score if it has been already added.- Specified by:
add
in interfaceRScoredSortedSet<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
true
if element has added andfalse
if not.
-
addAndGetRank
public addAndGetRank(double score, V object)
Description copied from interface:RScoredSortedSet
Adds element to this set, overrides previous score if it has been already added. Finally return the rank of the item- Specified by:
addAndGetRank
in interfaceRScoredSortedSet<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
- rank
-
addAndGetRankAsync
public > addAndGetRankAsync(double score, V object)
Description copied from interface:RScoredSortedSetAsync
Adds element to this set, overrides previous score if it has been already added. Finally return the rank of the item- Specified by:
addAndGetRankAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
- rank
-
addAndGetRevRank
public addAndGetRevRank(double score, V object)
Description copied from interface:RScoredSortedSet
Adds element to this set, overrides previous score if it has been already added. Finally return the reverse rank of the item- Specified by:
addAndGetRevRank
in interfaceRScoredSortedSet<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
- reverse rank
-
addAndGetRevRank
public <> addAndGetRevRank(<? extends > map)
Description copied from interface:RScoredSortedSet
Adds elements to this set, overrides previous score if it has been already added. Finally returns reverse rank list of the items- Specified by:
addAndGetRevRank
in interfaceRScoredSortedSet<V>
- Parameters:
map
- - map of object and scores, make sure to use an ordered map- Returns:
- collection of reverse ranks
-
addAndGetRevRankAsync
public > addAndGetRevRankAsync(double score, V object)
Description copied from interface:RScoredSortedSetAsync
Adds element to this set, overrides previous score if it has been already added. Finally return the reverse rank of the item- Specified by:
addAndGetRevRankAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
- reverse rank
-
addAndGetRevRankAsync
public <>> addAndGetRevRankAsync(<? extends > map)
Description copied from interface:RScoredSortedSetAsync
Adds elements to this set, overrides previous score if it has been already added. Finally returns reverse rank list of the items- Specified by:
addAndGetRevRankAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
map
- - map of object and scores, make sure to use an ordered map- Returns:
- collection of reverse ranks
-
tryAdd
public boolean tryAdd(double score, V object)
Description copied from interface:RScoredSortedSet
Adds element to this set only if has not been added before.Requires Redis 3.0.2 and higher.
- Specified by:
tryAdd
in interfaceRScoredSortedSet<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
true
if element added andfalse
if not.
-
addIfExists
public boolean addIfExists(double score, V object)
Description copied from interface:RScoredSortedSet
Adds element to this set only if it's already exists.Requires Redis 3.0.2 and higher.
- Specified by:
addIfExists
in interfaceRScoredSortedSet<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
true
if element added andfalse
if not.
-
addIfExistsAsync
public > addIfExistsAsync(double score, V object)
Description copied from interface:RScoredSortedSetAsync
Adds element to this set only if it's already exists.Requires Redis 3.0.2 and higher.
- Specified by:
addIfExistsAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
true
if element added andfalse
if not.
-
addIfLess
public boolean addIfLess(double score, V object)
Description copied from interface:RScoredSortedSet
Adds element to this set only if new score less than current score of existed element.Requires Redis 6.2.0 and higher.
- Specified by:
addIfLess
in interfaceRScoredSortedSet<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
true
if element added andfalse
if not.
-
addIfGreater
public boolean addIfGreater(double score, V object)
Description copied from interface:RScoredSortedSet
Adds element to this set only if new score greater than current score of existed element.Requires Redis 6.2.0 and higher.
- Specified by:
addIfGreater
in interfaceRScoredSortedSet<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
true
if element added andfalse
if not.
-
addIfLessAsync
public > addIfLessAsync(double score, V object)
Description copied from interface:RScoredSortedSetAsync
Adds element to this set only if new score less than current score of existed element.Requires Redis 6.2.0 and higher.
- Specified by:
addIfLessAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
true
if element added andfalse
if not.
-
addIfGreaterAsync
public > addIfGreaterAsync(double score, V object)
Description copied from interface:RScoredSortedSetAsync
Adds element to this set only if new score greater than current score of existed element.Requires Redis 6.2.0 and higher.
- Specified by:
addIfGreaterAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
true
if element added andfalse
if not.
-
first
public V first()
Description copied from interface:RScoredSortedSet
Returns the head element ornull
if this sorted set is empty.- Specified by:
first
in interfaceRScoredSortedSet<V>
- Returns:
- the head element or
null
if this sorted set is empty
-
firstAsync
public RFuture<V> firstAsync()
Description copied from interface:RScoredSortedSetAsync
Returns the head element ornull
if this sorted set is empty.- Specified by:
firstAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- the head element or
null
if this sorted set is empty
-
last
public V last()
Description copied from interface:RScoredSortedSet
Returns the tail element ornull
if this sorted set is empty.- Specified by:
last
in interfaceRScoredSortedSet<V>
- Returns:
- the tail element or
null
if this sorted set is empty
-
lastAsync
public RFuture<V> lastAsync()
Description copied from interface:RScoredSortedSetAsync
Returns the tail element ornull
if this sorted set is empty.- Specified by:
lastAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- the tail element or
null
if this sorted set is empty
-
firstScore
public firstScore()
Description copied from interface:RScoredSortedSet
Returns score of the tail element or returnsnull
if this sorted set is empty.- Specified by:
firstScore
in interfaceRScoredSortedSet<V>
- Returns:
- the tail element or
null
if this sorted set is empty
-
firstScoreAsync
public > firstScoreAsync()
Description copied from interface:RScoredSortedSetAsync
Returns score of the head element or returnsnull
if this sorted set is empty.- Specified by:
firstScoreAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- the tail element or
null
if this sorted set is empty
-
lastScore
public lastScore()
Description copied from interface:RScoredSortedSet
Returns score of the head element or returnsnull
if this sorted set is empty.- Specified by:
lastScore
in interfaceRScoredSortedSet<V>
- Returns:
- the tail element or
null
if this sorted set is empty
-
lastScoreAsync
public > lastScoreAsync()
Description copied from interface:RScoredSortedSetAsync
Returns score of the tail element or returnsnull
if this sorted set is empty.- Specified by:
lastScoreAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- the tail element or
null
if this sorted set is empty
-
addAsync
public > addAsync(double score, V object)
Description copied from interface:RScoredSortedSetAsync
Adds element to this set, overrides previous score if it has been already added.- Specified by:
addAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
true
if element has added andfalse
if not.
-
addAll
public int addAll(<> objects)
Description copied from interface:RScoredSortedSet
Adds all elements contained in the specified map to this sorted set. Map contains of score mapped by object.- Specified by:
addAll
in interfaceRScoredSortedSet<V>
- Parameters:
objects
- - map of elements to add- Returns:
- amount of added elements, not including already existing in this sorted set
-
addAllAsync
public > addAllAsync(<> objects)
Description copied from interface:RScoredSortedSetAsync
Adds all elements contained in the specified map to this sorted set. Map contains of score mapped by object.- Specified by:
addAllAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
objects
- - map of elements to add- Returns:
- amount of added elements, not including already existing in this sorted set
-
tryAddAsync
public > tryAddAsync(double score, V object)
Description copied from interface:RScoredSortedSetAsync
Adds element to this set only if has not been added before.Requires Redis 3.0.2 and higher.
- Specified by:
tryAddAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
true
if element has added andfalse
if not.
-
remove
public boolean remove( object)
Description copied from interface:RScoredSortedSet
Removes a single instance of the specified element from this sorted set, if it is present.- Specified by:
remove
in interfaceRScoredSortedSet<V>
- Parameters:
object
- element to be removed from this sorted set, if present- Returns:
true
if an element was removed as a result of this call
-
removeRangeByRank
public int removeRangeByRank(int startIndex, int endIndex)
Description copied from interface:RScoredSortedSet
Removes values by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Specified by:
removeRangeByRank
in interfaceRScoredSortedSet<V>
- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- number of elements removed
-
removeRangeByRankAsync
public > removeRangeByRankAsync(int startIndex, int endIndex)
Description copied from interface:RScoredSortedSetAsync
Removes values by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Specified by:
removeRangeByRankAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- number of elements removed
-
removeRangeByScore
public int removeRangeByScore(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Description copied from interface:RScoredSortedSet
Removes values by score range.- Specified by:
removeRangeByScore
in interfaceRScoredSortedSet<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- number of elements removed
-
removeRangeByScoreAsync
public > removeRangeByScoreAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Description copied from interface:RScoredSortedSetAsync
Removes values by score range.- Specified by:
removeRangeByScoreAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- number of elements removed
-
clear
public void clear()
Description copied from interface:RScoredSortedSet
Removes all elements of this sorted set.- Specified by:
clear
in interfaceRScoredSortedSet<V>
-
removeAsync
public > removeAsync( object)
Description copied from interface:RScoredSortedSetAsync
Removes a single instance of the specified element from this sorted set, if it is present.- Specified by:
removeAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
object
- element to be removed from this sorted set, if present- Returns:
true
if an element was removed as a result of this call
-
isEmpty
public boolean isEmpty()
Description copied from interface:RScoredSortedSet
Returnstrue
if this set is empty- Specified by:
isEmpty
in interfaceRScoredSortedSet<V>
- Returns:
true
if empty
-
size
public int size()
Description copied from interface:RScoredSortedSet
Returns size of this set.- Specified by:
size
in interfaceRScoredSortedSet<V>
- Returns:
- size
-
sizeAsync
public > sizeAsync()
Description copied from interface:RScoredSortedSetAsync
Returns size of this set.- Specified by:
sizeAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- size
-
contains
public boolean contains( object)
Description copied from interface:RScoredSortedSet
Returnstrue
if this sorted set contains encoded state of the specified element.- Specified by:
contains
in interfaceRScoredSortedSet<V>
- Parameters:
object
- element whose presence in this collection is to be tested- Returns:
true
if this sorted set contains the specified element andfalse
otherwise
-
containsAsync
public > containsAsync( o)
Description copied from interface:RScoredSortedSetAsync
Returnstrue
if this sorted set contains encoded state of the specified element.- Specified by:
containsAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
o
- element whose presence in this collection is to be tested- Returns:
true
if this sorted set contains the specified element andfalse
otherwise
-
getScore
public getScore(V o)
Description copied from interface:RScoredSortedSet
Returns score of element ornull
if it doesn't exist.- Specified by:
getScore
in interfaceRScoredSortedSet<V>
- Parameters:
o
- - element- Returns:
- score
-
getScore
public <> getScore(<V> keys)
Description copied from interface:RScoredSortedSet
Returns scores of elements.- Specified by:
getScore
in interfaceRScoredSortedSet<V>
- Parameters:
keys
- - elements- Returns:
- element scores
-
getScoreAsync
public > getScoreAsync(V o)
Description copied from interface:RScoredSortedSetAsync
Returns score of element ornull
if it doesn't exist.- Specified by:
getScoreAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
o
- - element- Returns:
- score
-
getScoreAsync
public <>> getScoreAsync(<V> elements)
Description copied from interface:RScoredSortedSetAsync
Returns scores of elements.- Specified by:
getScoreAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
elements
- - elements- Returns:
- element scores
-
rank
public rank(V o)
Description copied from interface:RScoredSortedSet
Returns rank of value, with the scores ordered from low to high.- Specified by:
rank
in interfaceRScoredSortedSet<V>
- Parameters:
o
- - object- Returns:
- rank or
null
if value does not exist
-
rankAsync
public > rankAsync(V o)
Description copied from interface:RScoredSortedSetAsync
Returns rank of value, with the scores ordered from low to high.- Specified by:
rankAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
o
- - object- Returns:
- rank or
null
if value does not exist
-
scanIteratorAsync
public >> scanIteratorAsync(RedisClient client, long startPos, pattern, int count)
-
iterator
public < pattern)
Description copied from interface:RScoredSortedSet
Returns an iterator over elements in this set. Ifpattern
is not null then only elements match this pattern are loaded.- Specified by:
iterator
in interfaceRScoredSortedSet<V>
- Parameters:
pattern
- - search pattern- Returns:
- iterator
-
iterator
public <V> iterator(int count)
Description copied from interface:RScoredSortedSet
Returns an iterator over elements in this set. Elements are loaded in batch. Batch size is defined bycount
param.- Specified by:
iterator
in interfaceRScoredSortedSet<V>
- Parameters:
count
- - size of elements batch- Returns:
- iterator
-
iterator
public < pattern, int count)
Description copied from interface:RScoredSortedSet
Returns an iterator over elements in this set. Elements are loaded in batch. Batch size is defined bycount
param. If pattern is not null then only elements match this pattern are loaded.- Specified by:
iterator
in interfaceRScoredSortedSet<V>
- Parameters:
pattern
- - search patterncount
- - size of elements batch- Returns:
- iterator
-
toArray
public [] toArray()
Description copied from interface:RScoredSortedSet
Returns this sorted set in array of Object type.- Specified by:
toArray
in interfaceRScoredSortedSet<V>
- Returns:
- array of values
-
toArray
public <T> T[] toArray(T[] a)
Description copied from interface:RScoredSortedSet
Returns this sorted set in array of defined type.- Specified by:
toArray
in interfaceRScoredSortedSet<V>
- Type Parameters:
T
- type of element- Parameters:
a
- - instance of array- Returns:
- array of values
-
containsAll
public boolean containsAll(<?> c)
Description copied from interface:RScoredSortedSet
Returnstrue
if this sorted set contains all of the elements in encoded state in the specified collection.- Specified by:
containsAll
in interfaceRScoredSortedSet<V>
- Parameters:
c
- collection to be checked for containment in this sorted set- Returns:
true
if this sorted set contains all of the elements in the specified collection
-
containsAllAsync
public > containsAllAsync(<?> c)
Description copied from interface:RScoredSortedSetAsync
Returnstrue
if this sorted set contains all of the elements in encoded state in the specified collection.- Specified by:
containsAllAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
c
- collection to be checked for containment in this sorted set- Returns:
true
if this sorted set contains all of the elements in the specified collection
-
removeAllAsync
public > removeAllAsync(<?> c)
Description copied from interface:RScoredSortedSetAsync
Removes all of this sorted set's elements that are also contained in the specified collection.- Specified by:
removeAllAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
c
- sorted set containing elements to be removed from this collection- Returns:
true
if this sorted set changed as a result of the call
-
removeAll
public boolean removeAll(<?> c)
Description copied from interface:RScoredSortedSet
Removes all of this sorted set's elements that are also contained in the specified collection.- Specified by:
removeAll
in interfaceRScoredSortedSet<V>
- Parameters:
c
- collection containing elements to be removed from this collection- Returns:
true
if this sorted set changed as a result of the call
-
retainAll
public boolean retainAll(<?> c)
Description copied from interface:RScoredSortedSet
Retains only the elements in this sorted set that are contained in the specified collection.- Specified by:
retainAll
in interfaceRScoredSortedSet<V>
- Parameters:
c
- collection containing elements to be retained in this collection- Returns:
true
if this sorted set changed as a result of the call
-
retainAllAsync
public > retainAllAsync(<?> c)
Description copied from interface:RScoredSortedSetAsync
Retains only the elements in this sorted set that are contained in the specified collection.- Specified by:
retainAllAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
c
- collection containing elements to be retained in this collection- Returns:
true
if this sorted set changed as a result of the call
-
addScore
public addScore(V object, value)
Description copied from interface:RScoredSortedSet
Increases score of specified element by value.- Specified by:
addScore
in interfaceRScoredSortedSet<V>
- Parameters:
object
- - element whose score needs to be increasedvalue
- - value- Returns:
- updated score of element
-
addScoreAsync
public > addScoreAsync(V object, value)
Description copied from interface:RScoredSortedSetAsync
Increases score of specified element by value.- Specified by:
addScoreAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
object
- - element whose score needs to be increasedvalue
- - value- Returns:
- updated score of element
-
addScoreAndGetRank
public addScoreAndGetRank(V object, value)
Description copied from interface:RScoredSortedSet
Adds score to element and returns its rank- Specified by:
addScoreAndGetRank
in interfaceRScoredSortedSet<V>
- Parameters:
object
- - object itselfvalue
- - object score- Returns:
- rank
-
addScoreAndGetRankAsync
public > addScoreAndGetRankAsync(V object, value)
Description copied from interface:RScoredSortedSetAsync
Adds score to element and returns its rank- Specified by:
addScoreAndGetRankAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
object
- - object itselfvalue
- - object score- Returns:
- rank
-
addScoreAndGetRevRank
public addScoreAndGetRevRank(V object, value)
Description copied from interface:RScoredSortedSet
Adds score to element and returns its reverse rank- Specified by:
addScoreAndGetRevRank
in interfaceRScoredSortedSet<V>
- Parameters:
object
- - object itselfvalue
- - object score- Returns:
- reverse rank
-
addScoreAndGetRevRankAsync
public > addScoreAndGetRevRankAsync(V object, value)
Description copied from interface:RScoredSortedSetAsync
Adds score to element and returns its reverse rank- Specified by:
addScoreAndGetRevRankAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
object
- - object itselfvalue
- - object score- Returns:
- reverse rank
-
valueRange
public <V> valueRange(int startIndex, int endIndex)
Description copied from interface:RScoredSortedSet
Returns values by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Specified by:
valueRange
in interfaceRScoredSortedSet<V>
- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- elements
-
valueRangeAsync
public <V>> valueRangeAsync(int startIndex, int endIndex)
Description copied from interface:RScoredSortedSetAsync
Returns values by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.Requires Redis 6.2.0 and higher.
- Specified by:
valueRangeAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- elements
-
valueRangeReversed
public <V> valueRangeReversed(int startIndex, int endIndex)
Description copied from interface:RScoredSortedSet
Returns values by rank range in reverse order. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Specified by:
valueRangeReversed
in interfaceRScoredSortedSet<V>
- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- elements
-
valueRangeReversedAsync
public <V>> valueRangeReversedAsync(int startIndex, int endIndex)
Description copied from interface:RScoredSortedSetAsync
Returns values by rank range in reverse order. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Specified by:
valueRangeReversedAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- elements
-
entryRange
public <ScoredEntry<V>> entryRange(int startIndex, int endIndex)
Description copied from interface:RScoredSortedSet
Returns entries (value and its score) by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Specified by:
entryRange
in interfaceRScoredSortedSet<V>
- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- entries
-
entryRangeAsync
public <ScoredEntry<V>>> entryRangeAsync(int startIndex, int endIndex)
Description copied from interface:RScoredSortedSetAsync
Returns entries (value and its score) by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Specified by:
entryRangeAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- entries
-
entryRangeReversed
public <ScoredEntry<V>> entryRangeReversed(int startIndex, int endIndex)
Description copied from interface:RScoredSortedSet
Returns entries (value and its score) by rank range in reverse order. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Specified by:
entryRangeReversed
in interfaceRScoredSortedSet<V>
- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- entries
-
entryRangeReversedAsync
public <ScoredEntry<V>>> entryRangeReversedAsync(int startIndex, int endIndex)
Description copied from interface:RScoredSortedSetAsync
Returns entries (value and its score) by rank range in reverse order. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Specified by:
entryRangeReversedAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- entries
-
valueRange
public <V> valueRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Description copied from interface:RScoredSortedSet
Returns all values betweenstartScore
andendScore
.- Specified by:
valueRange
in interfaceRScoredSortedSet<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- values
-
valueRangeAsync
public <V>> valueRangeAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Description copied from interface:RScoredSortedSetAsync
Returns all values betweenstartScore
andendScore
.- Specified by:
valueRangeAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- values
-
valueRangeReversed
public <V> valueRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Description copied from interface:RScoredSortedSet
Returns all values betweenstartScore
andendScore
in reversed order.- Specified by:
valueRangeReversed
in interfaceRScoredSortedSet<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- values
-
valueRangeReversedAsync
public <V>> valueRangeReversedAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Description copied from interface:RScoredSortedSetAsync
Returns all values betweenstartScore
andendScore
in reversed order.- Specified by:
valueRangeReversedAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- values
-
entryRange
public <ScoredEntry<V>> entryRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Description copied from interface:RScoredSortedSet
Returns all entries (value and its score) betweenstartScore
andendScore
.- Specified by:
entryRange
in interfaceRScoredSortedSet<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- entries
-
entryRangeAsync
public <ScoredEntry<V>>> entryRangeAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Description copied from interface:RScoredSortedSetAsync
Returns all entries (value and its score) betweenstartScore
andendScore
.- Specified by:
entryRangeAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- entries
-
valueRange
public <V> valueRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Description copied from interface:RScoredSortedSet
Returns all values betweenstartScore
andendScore
.- Specified by:
valueRange
in interfaceRScoredSortedSet<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- values
-
valueRangeAsync
public <V>> valueRangeAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Description copied from interface:RScoredSortedSetAsync
Returns all values betweenstartScore
andendScore
.- Specified by:
valueRangeAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- values
-
valueRangeReversed
public <V> valueRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Description copied from interface:RScoredSortedSet
Returns all values betweenstartScore
andendScore
in reversed order.- Specified by:
valueRangeReversed
in interfaceRScoredSortedSet<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- values
-
valueRangeReversedAsync
public <V>> valueRangeReversedAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Description copied from interface:RScoredSortedSetAsync
Returns all values betweenstartScore
andendScore
in reversed order.- Specified by:
valueRangeReversedAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- values
-
entryRange
public <ScoredEntry<V>> entryRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Description copied from interface:RScoredSortedSet
Returns all entries (value and its score) betweenstartScore
andendScore
.- Specified by:
entryRange
in interfaceRScoredSortedSet<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- entries
-
entryRangeReversed
public <ScoredEntry<V>> entryRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Description copied from interface:RScoredSortedSet
Returns all entries (value and its score) betweenstartScore
andendScore
in reversed order.- Specified by:
entryRangeReversed
in interfaceRScoredSortedSet<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- entries
-
entryRangeAsync
public <ScoredEntry<V>>> entryRangeAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Description copied from interface:RScoredSortedSetAsync
Returns all entries (value and its score) betweenstartScore
andendScore
.- Specified by:
entryRangeAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- entries
-
entryRangeReversed
public <ScoredEntry<V>> entryRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Description copied from interface:RScoredSortedSet
Returns all entries (value and its score) betweenstartScore
andendScore
in reversed order.- Specified by:
entryRangeReversed
in interfaceRScoredSortedSet<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- entries
-
entryRangeReversedAsync
public <ScoredEntry<V>>> entryRangeReversedAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Description copied from interface:RScoredSortedSetAsync
Returns all entries (value and its score) betweenstartScore
andendScore
in reversed order.- Specified by:
entryRangeReversedAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- entries
-
entryRangeReversedAsync
public <ScoredEntry<V>>> entryRangeReversedAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Description copied from interface:RScoredSortedSetAsync
Returns all entries (value and its score) betweenstartScore
andendScore
in reversed order.- Specified by:
entryRangeReversedAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- entries
-
revRankAsync
public > revRankAsync(V o)
Description copied from interface:RScoredSortedSetAsync
Returns rank of value, with the scores ordered from high to low.- Specified by:
revRankAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
o
- - object- Returns:
- rank or
null
if value does not exist
-
revRank
public revRank(V o)
Description copied from interface:RScoredSortedSet
Returns rank of value, with the scores ordered from high to low.- Specified by:
revRank
in interfaceRScoredSortedSet<V>
- Parameters:
o
- - object- Returns:
- rank or
null
if value does not exist
-
revRankAsync
public <>> revRankAsync(<V> elements)
Description copied from interface:RScoredSortedSetAsync
Returns ranks of elements, with the scores ordered from high to low.- Specified by:
revRankAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
elements
- - elements- Returns:
- ranks or
null
if value does not exist
-
revRank
public <> revRank(<V> elements)
Description copied from interface:RScoredSortedSet
Returns ranks of elements, with the scores ordered from high to low.- Specified by:
revRank
in interfaceRScoredSortedSet<V>
- Parameters:
elements
- - elements- Returns:
- ranks or
null
if value does not exist
-
count
public int count(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Description copied from interface:RScoredSortedSet
Returns the number of elements with a score betweenstartScore
andendScore
.- Specified by:
count
in interfaceRScoredSortedSet<V>
- Parameters:
startScore
- - start scorestartScoreInclusive
- - start score inclusiveendScore
- - end scoreendScoreInclusive
- - end score inclusive- Returns:
- count of elements
-
countAsync
public > countAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Description copied from interface:RScoredSortedSetAsync
Returns the number of elements with a score betweenstartScore
andendScore
.- Specified by:
countAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
startScore
- - start scorestartScoreInclusive
- - start score inclusiveendScore
- - end scoreendScoreInclusive
- - end score inclusive- Returns:
- count
-
intersection
public int intersection(... names)
Description copied from interface:RScoredSortedSet
Intersect provided ScoredSortedSets and store result to current ScoredSortedSet- Specified by:
intersection
in interfaceRScoredSortedSet<V>
- Parameters:
names
- - names of ScoredSortedSet- Returns:
- length of intersection
-
intersectionAsync
public > intersectionAsync(... names)
Description copied from interface:RScoredSortedSetAsync
Intersect provided ScoredSortedSets and store result to current ScoredSortedSet- Specified by:
intersectionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
names
- - names of ScoredSortedSet- Returns:
- length of intersection
-
intersection
public int intersection(RScoredSortedSet.Aggregate aggregate, ... names)
Description copied from interface:RScoredSortedSet
Intersect provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSet- Specified by:
intersection
in interfaceRScoredSortedSet<V>
- Parameters:
aggregate
- - score aggregation modenames
- - names of ScoredSortedSet- Returns:
- length of intersection
-
intersectionAsync
public > intersectionAsync(RScoredSortedSet.Aggregate aggregate, ... names)
Description copied from interface:RScoredSortedSetAsync
Intersect provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSet- Specified by:
intersectionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
aggregate
- - score aggregation modenames
- - names of ScoredSortedSet- Returns:
- length of intersection
-
intersection
public int intersection(<,> nameWithWeight)
Description copied from interface:RScoredSortedSet
Intersect provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSet- Specified by:
intersection
in interfaceRScoredSortedSet<V>
- Parameters:
nameWithWeight
- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- length of intersection
-
intersectionAsync
public > intersectionAsync(<,> nameWithWeight)
Description copied from interface:RScoredSortedSetAsync
Intersect provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSet- Specified by:
intersectionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
nameWithWeight
- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- length of intersection
-
intersection
public int intersection(RScoredSortedSet.Aggregate aggregate, <,> nameWithWeight)
Description copied from interface:RScoredSortedSet
Intersect provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSet- Specified by:
intersection
in interfaceRScoredSortedSet<V>
- Parameters:
aggregate
- - score aggregation modenameWithWeight
- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- length of intersection
-
intersectionAsync
public > intersectionAsync(RScoredSortedSet.Aggregate aggregate, <,> nameWithWeight)
Description copied from interface:RScoredSortedSetAsync
Intersect provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSet- Specified by:
intersectionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
aggregate
- - score aggregation modenameWithWeight
- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- length of intersection
-
readIntersection
public <... names)
Description copied from interface:RScoredSortedSet
Intersect provided ScoredSortedSets with current ScoredSortedSet without state changeRequires Redis 6.2.0 and higher.
- Specified by:
readIntersection
in interfaceRScoredSortedSet<V>
- Parameters:
names
- - names of ScoredSortedSet- Returns:
- result of intersection
-
readIntersectionAsync
public <... names)
Description copied from interface:RScoredSortedSetAsync
Intersect provided ScoredSortedSets with current ScoredSortedSet without state changeRequires Redis 6.2.0 and higher.
- Specified by:
readIntersectionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
names
- - names of ScoredSortedSet- Returns:
- result of intersection
-
readIntersection
public <V> readIntersection(RScoredSortedSet.Aggregate aggregate, ... names)
Description copied from interface:RScoredSortedSet
Intersect provided ScoredSortedSets with current ScoredSortedSet using defined aggregation method without state changeRequires Redis 6.2.0 and higher.
- Specified by:
readIntersection
in interfaceRScoredSortedSet<V>
- Parameters:
aggregate
- - score aggregation modenames
- - names of ScoredSortedSet- Returns:
- result of intersection
-
readIntersectionAsync
public <V>> readIntersectionAsync(RScoredSortedSet.Aggregate aggregate, ... names)
Description copied from interface:RScoredSortedSetAsync
Intersect provided ScoredSortedSets with current ScoredSortedSet using defined aggregation method without state changeRequires Redis 6.2.0 and higher.
- Specified by:
readIntersectionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
aggregate
- - score aggregation modenames
- - names of ScoredSortedSet- Returns:
- result of intersection
-
readIntersection
public <<,> nameWithWeight)
Description copied from interface:RScoredSortedSet
Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet without state changeRequires Redis 6.2.0 and higher.
- Specified by:
readIntersection
in interfaceRScoredSortedSet<V>
- Parameters:
nameWithWeight
- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- result of intersection
-
readIntersectionAsync
public <<,> nameWithWeight)
Description copied from interface:RScoredSortedSetAsync
Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet without state changeRequires Redis 6.2.0 and higher.
- Specified by:
readIntersectionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
nameWithWeight
- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- result of intersection
-
readIntersection
public <V> readIntersection(RScoredSortedSet.Aggregate aggregate, <,> nameWithWeight)
Description copied from interface:RScoredSortedSet
Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet using defined aggregation method without state changeRequires Redis 6.2.0 and higher.
- Specified by:
readIntersection
in interfaceRScoredSortedSet<V>
- Parameters:
aggregate
- - score aggregation modenameWithWeight
- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- result of intersection
-
readIntersectionAsync
public <V>> readIntersectionAsync(RScoredSortedSet.Aggregate aggregate, <,> nameWithWeight)
Description copied from interface:RScoredSortedSetAsync
Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet using defined aggregation method without state changeRequires Redis 6.2.0 and higher.
- Specified by:
readIntersectionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
aggregate
- - score aggregation modenameWithWeight
- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- result of intersection
-
union
public int union(... names)
Description copied from interface:RScoredSortedSet
Union provided ScoredSortedSets and store result to current ScoredSortedSet- Specified by:
union
in interfaceRScoredSortedSet<V>
- Parameters:
names
- - names of ScoredSortedSet- Returns:
- length of union
-
unionAsync
public > unionAsync(... names)
Description copied from interface:RScoredSortedSetAsync
Union provided ScoredSortedSets and store result to current ScoredSortedSet- Specified by:
unionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
names
- - names of ScoredSortedSet- Returns:
- length of union
-
union
public int union(RScoredSortedSet.Aggregate aggregate, ... names)
Description copied from interface:RScoredSortedSet
Union provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSet- Specified by:
union
in interfaceRScoredSortedSet<V>
- Parameters:
aggregate
- - score aggregation modenames
- - names of ScoredSortedSet- Returns:
- length of union
-
unionAsync
public > unionAsync(RScoredSortedSet.Aggregate aggregate, ... names)
Description copied from interface:RScoredSortedSetAsync
Union provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSet- Specified by:
unionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
aggregate
- - score aggregation modenames
- - names of ScoredSortedSet- Returns:
- length of union
-
union
public int union(<,> nameWithWeight)
Description copied from interface:RScoredSortedSet
Union provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSet- Specified by:
union
in interfaceRScoredSortedSet<V>
- Parameters:
nameWithWeight
- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- length of union
-
unionAsync
public > unionAsync(<,> nameWithWeight)
Description copied from interface:RScoredSortedSetAsync
Union provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSet- Specified by:
unionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
nameWithWeight
- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- length of union
-
union
public int union(RScoredSortedSet.Aggregate aggregate, <,> nameWithWeight)
Description copied from interface:RScoredSortedSet
Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSet- Specified by:
union
in interfaceRScoredSortedSet<V>
- Parameters:
aggregate
- - score aggregation modenameWithWeight
- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- length of union
-
unionAsync
public > unionAsync(RScoredSortedSet.Aggregate aggregate, <,> nameWithWeight)
Description copied from interface:RScoredSortedSetAsync
Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSet- Specified by:
unionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
aggregate
- - score aggregation modenameWithWeight
- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- length of union
-
readUnion
public <... names)
Description copied from interface:RScoredSortedSet
Union ScoredSortedSets specified by name with current ScoredSortedSet without state change.Requires Redis 6.2.0 and higher.
- Specified by:
readUnion
in interfaceRScoredSortedSet<V>
- Parameters:
names
- - names of ScoredSortedSet- Returns:
- result of union
-
readUnionAsync
public <... names)
Description copied from interface:RScoredSortedSetAsync
Union ScoredSortedSets specified by name with current ScoredSortedSet without state change.Requires Redis 6.2.0 and higher.
- Specified by:
readUnionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
names
- - names of ScoredSortedSet- Returns:
- result of union
-
readUnion
public <V> readUnion(RScoredSortedSet.Aggregate aggregate, ... names)
Description copied from interface:RScoredSortedSet
Union ScoredSortedSets specified by name with defined aggregation method and current ScoredSortedSet without state change.Requires Redis 6.2.0 and higher.
- Specified by:
readUnion
in interfaceRScoredSortedSet<V>
- Parameters:
aggregate
- - score aggregation modenames
- - names of ScoredSortedSet- Returns:
- result of union
-
readUnionAsync
public <V>> readUnionAsync(RScoredSortedSet.Aggregate aggregate, ... names)
Description copied from interface:RScoredSortedSetAsync
Union ScoredSortedSets specified by name with defined aggregation method and current ScoredSortedSet without state change.Requires Redis 6.2.0 and higher.
- Specified by:
readUnionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
aggregate
- - score aggregation modenames
- - names of ScoredSortedSet- Returns:
- result of union
-
readUnion
public <<,> nameWithWeight)
Description copied from interface:RScoredSortedSet
Union provided ScoredSortedSets mapped to weight multiplier and current ScoredSortedSet without state change.Requires Redis 6.2.0 and higher.
- Specified by:
readUnion
in interfaceRScoredSortedSet<V>
- Parameters:
nameWithWeight
- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- result of union
-
readUnionAsync
public <<,> nameWithWeight)
Description copied from interface:RScoredSortedSetAsync
Union provided ScoredSortedSets mapped to weight multiplier and current ScoredSortedSet without state change.Requires Redis 6.2.0 and higher.
- Specified by:
readUnionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
nameWithWeight
- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- result of union
-
readUnion
public <V> readUnion(RScoredSortedSet.Aggregate aggregate, <,> nameWithWeight)
Description copied from interface:RScoredSortedSet
Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and current ScoredSortedSet without state changeRequires Redis 6.2.0 and higher.
- Specified by:
readUnion
in interfaceRScoredSortedSet<V>
- Parameters:
aggregate
- - score aggregation modenameWithWeight
- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- result of union
-
readUnionAsync
public <V>> readUnionAsync(RScoredSortedSet.Aggregate aggregate, <,> nameWithWeight)
Description copied from interface:RScoredSortedSetAsync
Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and current ScoredSortedSet without state changeRequires Redis 6.2.0 and higher.
- Specified by:
readUnionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
aggregate
- - score aggregation modenameWithWeight
- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- result of union
-
readSort
public <V> readSort(SortOrder order)
Description copied from interface:RSortable
Read data in sorted view
-
readSortAsync
public <V>> readSortAsync(SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Parameters:
order
- for sorted data- Returns:
- sorted collection
-
readSort
public <V> readSort(SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view
-
readSortAsync
public <V>> readSortAsync(SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Parameters:
order
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection
-
readSort
public < byPattern, SortOrder order)
Description copied from interface:RSortable
Read data in sorted view
-
readSortAsync
public < byPattern, SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted data- Returns:
- sorted collection
-
readSort
public < byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view
-
readSortAsync
public < byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection
-
readSort
public <T> <T> readSort( byPattern, <> getPatterns, SortOrder order)
Description copied from interface:RSortable
Read data in sorted view
-
readSortAsync
public <T> <T>> readSortAsync( byPattern, <> getPatterns, SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted data- Returns:
- sorted collection
-
readSort
public <T> <T> readSort( byPattern, <> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view- Specified by:
readSort
in interfaceRSortable<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection
-
readSortAsync
public <T> <T>> readSortAsync( byPattern, <> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection
-
readSortAlpha
public <V> readSortAlpha(SortOrder order)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Parameters:
order
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
public <V> readSortAlpha(SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Parameters:
order
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
public < byPattern, SortOrder order)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
public < byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
public <T> <T> readSortAlpha( byPattern, <> getPatterns, SortOrder order)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
public <T> <T> readSortAlpha( byPattern, <> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public <V>> readSortAlphaAsync(SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Parameters:
order
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public <V>> readSortAlphaAsync(SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Parameters:
order
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public < byPattern, SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public < byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public <T> <T>> readSortAlphaAsync( byPattern, <> getPatterns, SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public <T> <T>> readSortAlphaAsync( byPattern, <> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
sortTo
public int sortTo( destName, SortOrder order)
Description copied from interface:RSortable
Sort data and store todestName
list
-
sortToAsync
public > sortToAsync( destName, SortOrder order)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationorder
- for sorted data- Returns:
- length of sorted data
-
sortTo
public int sortTo( destName, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Sort data and store todestName
list
-
sortToAsync
public > sortToAsync( destName, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- length of sorted data
-
sortTo
public int sortTo( destName, byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Sort data and store todestName
list
-
sortTo
public int sortTo( destName, byPattern, SortOrder order)
Description copied from interface:RSortable
Sort data and store todestName
list
-
sortToAsync
public > sortToAsync( destName, byPattern, SortOrder order)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortingorder
- for sorted data- Returns:
- length of sorted data
-
sortToAsync
public > sortToAsync( destName, byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortingorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- length of sorted data
-
sortTo
public int sortTo( destName, byPattern, <> getPatterns, SortOrder order)
Description copied from interface:RSortable
Sort data and store todestName
list
-
sortToAsync
public > sortToAsync( destName, byPattern, <> getPatterns, SortOrder order)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted data- Returns:
- length of sorted data
-
sortTo
public int sortTo( destName, byPattern, <> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Sort data and store todestName
list- Specified by:
sortTo
in interfaceRSortable<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- length of sorted data
-
sortToAsync
public > sortToAsync( destName, byPattern, <> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- length of sorted data
-
readDiff
public <... names)
Description copied from interface:RScoredSortedSet
Diff ScoredSortedSets specified by name with current ScoredSortedSet without state change.Requires Redis 6.2.0 and higher.
- Specified by:
readDiff
in interfaceRScoredSortedSet<V>
- Parameters:
names
- - name of sets- Returns:
- result of diff
-
readDiffAsync
public <... names)
Description copied from interface:RScoredSortedSetAsync
Diff ScoredSortedSets specified by name with current ScoredSortedSet without state change.Requires Redis 6.2.0 and higher.
- Specified by:
readDiffAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
names
- - name of sets- Returns:
- result of diff
-
diff
public int diff(... names)
Description copied from interface:RScoredSortedSet
Diff provided ScoredSortedSets and store result to current ScoredSortedSetRequires Redis 6.2.0 and higher.
- Specified by:
diff
in interfaceRScoredSortedSet<V>
- Parameters:
names
- - name of sets- Returns:
- length of diff
-
diffAsync
public > diffAsync(... names)
Description copied from interface:RScoredSortedSetAsync
Diff provided ScoredSortedSets and store result to current ScoredSortedSetRequires Redis 6.2.0 and higher.
- Specified by:
diffAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
names
- - name of sets- Returns:
- length of diff
-
rangeTo
public int rangeTo( destName, int startIndex, int endIndex)
Description copied from interface:RScoredSortedSet
Stores to defined ScoredSortedSet values by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.Requires Redis 6.2.0 and higher.
- Specified by:
rangeTo
in interfaceRScoredSortedSet<V>
startIndex
- - start indexendIndex
- - end index- Returns:
- elements
-
rangeTo
public int rangeTo( destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Description copied from interface:RScoredSortedSet
Stores to defined ScoredSortedSet values betweenstartScore
andendScore
.Requires Redis 6.2.0 and higher.
- Specified by:
rangeTo
in interfaceRScoredSortedSet<V>
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- values
-
rangeTo
public int rangeTo( destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Description copied from interface:RScoredSortedSet
Stores to defined ScoredSortedSet values betweenstartScore
andendScore
.Requires Redis 6.2.0 and higher.
- Specified by:
rangeTo
in interfaceRScoredSortedSet<V>
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- values
-
revRangeTo
public int revRangeTo( destName, int startIndex, int endIndex)
Description copied from interface:RScoredSortedSet
Stores to defined ScoredSortedSet values in reversed order by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.Requires Redis 6.2.0 and higher.
- Specified by:
revRangeTo
in interfaceRScoredSortedSet<V>
startIndex
- - start indexendIndex
- - end index- Returns:
- elements
-
revRangeTo
public int revRangeTo( destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Description copied from interface:RScoredSortedSet
Stores to defined ScoredSortedSet values in reversed order betweenstartScore
andendScore
.Requires Redis 6.2.0 and higher.
- Specified by:
revRangeTo
in interfaceRScoredSortedSet<V>
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- values
-
revRangeTo
public int revRangeTo( destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Description copied from interface:RScoredSortedSet
Stores to defined ScoredSortedSet values in reversed order betweenstartScore
andendScore
.Requires Redis 6.2.0 and higher.
- Specified by:
revRangeTo
in interfaceRScoredSortedSet<V>
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- values
-
revRangeToAsync
public > revRangeToAsync( destName, int startIndex, int endIndex)
Description copied from interface:RScoredSortedSetAsync
Stores to defined ScoredSortedSet values in reversed order by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Specified by:
revRangeToAsync
in interfaceRScoredSortedSetAsync<V>
startIndex
- - start indexendIndex
- - end index- Returns:
- elements
-
revRangeToAsync
public > revRangeToAsync( destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Description copied from interface:RScoredSortedSetAsync
Stores to defined ScoredSortedSet values in reversed order betweenstartScore
andendScore
.Requires Redis 6.2.0 and higher.
- Specified by:
revRangeToAsync
in interfaceRScoredSortedSetAsync<V>
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- values
-
revRangeToAsync
public > revRangeToAsync( destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Description copied from interface:RScoredSortedSetAsync
Stores to defined ScoredSortedSet values in reversed order betweenstartScore
andendScore
.Requires Redis 6.2.0 and higher.
- Specified by:
revRangeToAsync
in interfaceRScoredSortedSetAsync<V>
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- values
-
rangeToAsync
public > rangeToAsync( destName, int startIndex, int endIndex)
Description copied from interface:RScoredSortedSetAsync
Stores to defined ScoredSortedSet values by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Specified by:
rangeToAsync
in interfaceRScoredSortedSetAsync<V>
startIndex
- - start indexendIndex
- - end index- Returns:
- elements
-
rangeToAsync
public > rangeToAsync( destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Description copied from interface:RScoredSortedSetAsync
Stores to defined ScoredSortedSet values betweenstartScore
andendScore
.Requires Redis 6.2.0 and higher.
- Specified by:
rangeToAsync
in interfaceRScoredSortedSetAsync<V>
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- values
-
rangeToAsync
public > rangeToAsync( destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Description copied from interface:RScoredSortedSetAsync
Stores to defined ScoredSortedSet values betweenstartScore
andendScore
.Requires Redis 6.2.0 and higher.
- Specified by:
rangeToAsync
in interfaceRScoredSortedSetAsync<V>
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- values
-
takeFirstAsync
public RFuture<V> takeFirstAsync()
Description copied from interface:RScoredSortedSetAsync
Removes and returns the head element waiting if necessary for an element to become available.- Specified by:
takeFirstAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- the head element
-
takeLastAsync
public RFuture<V> takeLastAsync()
Description copied from interface:RScoredSortedSetAsync
Removes and returns the tail element waiting if necessary for an element to become available.- Specified by:
takeLastAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- the tail element
-
takeFirst
public V takeFirst()
Description copied from interface:RScoredSortedSet
Removes and returns the head element waiting if necessary for an element to become available.- Specified by:
takeFirst
in interfaceRScoredSortedSet<V>
- Returns:
- the head element
-
takeLast
public V takeLast()
Description copied from interface:RScoredSortedSet
Removes and returns the tail element waiting if necessary for an element to become available.- Specified by:
takeLast
in interfaceRScoredSortedSet<V>
- Returns:
- the tail element
-
subscribeOnFirstElements
public int subscribeOnFirstElements(<V> consumer)
Description copied from interface:RScoredSortedSet
Subscribes on first elements appeared in this set. Continuously invokesRScoredSortedSetAsync.takeFirstAsync()
method to get a new element.- Specified by:
subscribeOnFirstElements
in interfaceRScoredSortedSet<V>
- Parameters:
consumer
- - queue elements listener- Returns:
- listenerId - id of listener
-
subscribeOnLastElements
public int subscribeOnLastElements(<V> consumer)
Description copied from interface:RScoredSortedSet
Subscribes on last elements appeared in this set. Continuously invokesRScoredSortedSetAsync.takeLastAsync()
method to get a new element.- Specified by:
subscribeOnLastElements
in interfaceRScoredSortedSet<V>
- Parameters:
consumer
- - queue elements listener- Returns:
- listenerId - id of listener
-
unsubscribe
public void unsubscribe(int listenerId)
Description copied from interface:RScoredSortedSet
Un-subscribes defined listener.- Specified by:
unsubscribe
in interfaceRScoredSortedSet<V>
- Parameters:
listenerId
- - id of listener
-
stream
public <V> stream()
Description copied from interface:RScoredSortedSet
Returns stream of elements in this set. Elements are loaded in batch. Batch size is 10.- Specified by:
stream
in interfaceRScoredSortedSet<V>
- Returns:
- stream of elements
-
stream
public < pattern)
Description copied from interface:RScoredSortedSet
Returns stream of elements in this set. Ifpattern
is not null then only elements match this pattern are loaded.- Specified by:
stream
in interfaceRScoredSortedSet<V>
- Parameters:
pattern
- - search pattern- Returns:
- stream of elements
-
stream
public <V> stream(int count)
Description copied from interface:RScoredSortedSet
Returns stream of elements in this set. Elements are loaded in batch. Batch size is defined bycount
param.- Specified by:
stream
in interfaceRScoredSortedSet<V>
- Parameters:
count
- - size of elements batch- Returns:
- stream of elements
-
stream
public < pattern, int count)
Description copied from interface:RScoredSortedSet
Returns stream of elements in this set. Elements are loaded in batch. Batch size is defined bycount
param. If pattern is not null then only elements match this pattern are loaded.- Specified by:
stream
in interfaceRScoredSortedSet<V>
- Parameters:
pattern
- - search patterncount
- - size of elements batch- Returns:
- stream of elements
-
addListener
public int addListener(ObjectListener listener)
Description copied from interface:RObject
Adds object event listener- Specified by:
addListener
in interfaceRObject
- Overrides:
addListener
in classRedissonObject
- Parameters:
listener
- - object event listener- Returns:
- listener id
- See Also:
ExpiredObjectListener
,DeletedObjectListener
-
addListenerAsync
public > addListenerAsync(ObjectListener listener)
Description copied from interface:RObjectAsync
Adds object event listener- Specified by:
addListenerAsync
in interfaceRObjectAsync
- Overrides:
addListenerAsync
in classRedissonObject
- Parameters:
listener
- - object event listener- Returns:
- listener id
- See Also:
ExpiredObjectListener
,DeletedObjectListener
-
removeListener
public void removeListener(int listenerId)
Description copied from interface:RObject
Removes object event listener- Specified by:
removeListener
in interfaceRObject
- Overrides:
removeListener
in classRedissonObject
- Parameters:
listenerId
- - listener id
-
removeListenerAsync
public > removeListenerAsync(int listenerId)
Description copied from interface:RObjectAsync
Removes object event listener- Specified by:
removeListenerAsync
in interfaceRObjectAsync
- Overrides:
removeListenerAsync
in classRedissonObject
- Parameters:
listenerId
- - listener id
-
expire
public boolean expire(long timeToLive, timeUnit)
Description copied from interface:RExpirable
Set a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expire
in interfaceRExpirable
- Parameters:
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unit- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
public > expireAsync(long timeToLive, timeUnit)
Description copied from interface:RExpirableAsync
Set a timeout for object in async mode. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unit- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
public boolean expireAt(long timestamp)
Description copied from interface:RExpirable
UseRExpirable.expire(Instant)
instead- Specified by:
expireAt
in interfaceRExpirable
- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
expireAtAsync
public > expireAtAsync(long timestamp)
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Instant)
instead- Specified by:
expireAtAsync
in interfaceRExpirableAsync
- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
expire
public boolean expire( instant)
Description copied from interface:RExpirable
Set an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expire
in interfaceRExpirable
- Parameters:
instant
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
public > expireAsync( instant)
Description copied from interface:RExpirableAsync
Set an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
instant
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
public boolean expireAt( timestamp)
Description copied from interface:RExpirable
UseRExpirable.expire(Instant)
instead- Specified by:
expireAt
in interfaceRExpirable
- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAtAsync
public > expireAtAsync( timestamp)
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Instant)
instead- Specified by:
expireAtAsync
in interfaceRExpirableAsync
- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
clearExpire
public boolean clearExpire()
Description copied from interface:RExpirable
Clear an expire timeout or expire date for object.- Specified by:
clearExpire
in interfaceRExpirable
- Returns:
true
if timeout was removedfalse
if object does not exist or does not have an associated timeout
-
clearExpireAsync
public > clearExpireAsync()
Description copied from interface:RExpirableAsync
Clear an expire timeout or expire date for object in async mode. Object will not be deleted.- Specified by:
clearExpireAsync
in interfaceRExpirableAsync
- Returns:
true
if the timeout was cleared andfalse
if not
-
remainTimeToLive
public long remainTimeToLive()
Description copied from interface:RExpirable
Remaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLive
in interfaceRExpirable
- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
remainTimeToLiveAsync
public > remainTimeToLiveAsync()
Description copied from interface:RExpirableAsync
Remaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLiveAsync
in interfaceRExpirableAsync
- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
expireAsync
protected > expireAsync(long timeToLive, timeUnit, ... keys)
-
expireAtAsync
protected > expireAtAsync(long timestamp, ... keys)
-
clearExpireAsync
protected > clearExpireAsync(... keys)
-
-