Class RedissonScoredSortedSet<V>
- Type Parameters:
V
- value type
- All Implemented Interfaces:
Iterable<V>
,RExpirable
,RExpirableAsync
,RObject
,RObjectAsync
,RScoredSortedSet<V>
,RScoredSortedSetAsync<V>
,RSortable<Set<V>>
,RSortableAsync<Set<V>>
- Direct Known Subclasses:
RedissonGeo
,RedissonLexSortedSet
- 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
ConstructorDescriptionRedissonScoredSortedSet
(Codec codec, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson) RedissonScoredSortedSet
(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Adds element to this set, overrides previous score if it has been already added.int
Adds all elements contained in the specified map to this sorted set.addAllAsync
(Map<V, Double> objects) Adds all elements contained in the specified map to this sorted set.int
addAllIfAbsent
(Map<V, Double> objects) Adds elements to this set only if they haven't been added before.addAllIfAbsentAsync
(Map<V, Double> objects) Adds elements to this set only if they haven't been added before.int
addAllIfExist
(Map<V, Double> objects) Adds elements to this set only if they already exist.addAllIfExistAsync
(Map<V, Double> objects) Adds elements to this set only if they already exist.int
addAllIfGreater
(Map<V, Double> objects) Adds elements to this set only if new scores greater than current score of existed elements.addAllIfGreaterAsync
(Map<V, Double> objects) Adds elements to this set only if new scores greater than current score of existed elements.int
addAllIfLess
(Map<V, Double> objects) Adds elements to this set only if new scores less than current score of existed elements.addAllIfLessAsync
(Map<V, Double> objects) Adds elements to this set only if new scores less than current score of existed elements.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.addAndGetRevRank
(Map<? extends V, Double> 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.addAndGetRevRankAsync
(Map<? extends V, Double> map) Adds elements to this set, overrides previous score if it has been already added.Adds element to this set, overrides previous score if it has been already added.boolean
addIfAbsent
(double score, V object) Adds element to this set only if has not been added before.addIfAbsentAsync
(double score, V object) Adds element to this set only if has not been added before.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
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 listeneraddListenerAsync
(ObjectListener listener) Adds object event listenerIncreases score of specified element by value.addScoreAndGetRank
(V object, Number value) Adds score to element and returns its rankaddScoreAndGetRankAsync
(V object, Number value) Adds score to element and returns its rankaddScoreAndGetRevRank
(V object, Number value) Adds score to element and returns its reverse rankaddScoreAndGetRevRankAsync
(V object, Number value) Adds score to element and returns its reverse rankaddScoreAsync
(V object, Number value) Increases score of specified element by value.void
clear()
Removes all elements of this sorted set.boolean
Clear an expire timeout or expire date for object.Clear an expire timeout or expire date for object in async mode.clearExpireAsync
(String... keys) boolean
Returnstrue
if this sorted set contains encoded state of the specified element.boolean
containsAll
(Collection<?> c) Returnstrue
if this sorted set contains all of the elements in encoded state in the specified collection.containsAllAsync
(Collection<?> c) Returnstrue
if this sorted set contains all of the elements in encoded state in the specified collection.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
.countIntersection
(int limit, String... names) Counts elements of set as a result of sets intersection with current set.countIntersection
(String... names) Counts elements of set as a result of sets intersection with current set.countIntersectionAsync
(int limit, String... names) Counts elements of set as a result of sets intersection with current set.countIntersectionAsync
(String... names) Counts elements of set as a result of sets intersection with current set.int
Diff provided ScoredSortedSets and store result to current ScoredSortedSetDiff provided ScoredSortedSets and store result to current ScoredSortedSetdistributedIterator
(int count) Returns element iterator that can be shared across multiple applications.distributedIterator
(String pattern) Returns iterator over elements that match specified pattern.distributedIterator
(String iteratorName, String pattern, int count) Returns iterator over elements that match specified pattern.Returns an iterator over entries (value and its score) in this set.entryIterator
(int count) Returns an iterator over entries (value and its score) in this set.entryIterator
(String pattern) Returns an iterator over entries (value and its score) in this set.entryIterator
(String pattern, int count) Returns an iterator over entries (value and its score) in this set.entryRange
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all entries (value and its score) betweenstartScore
andendScore
.entryRange
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all entries (value and its score) betweenstartScore
andendScore
.entryRange
(int startIndex, int endIndex) Returns entries (value and its score) by rank range.entryRangeAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all entries (value and its score) betweenstartScore
andendScore
.entryRangeAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all entries (value and its score) betweenstartScore
andendScore
.entryRangeAsync
(int startIndex, int endIndex) Returns entries (value and its score) by rank range.entryRangeReversed
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all entries (value and its score) betweenstartScore
andendScore
in reversed order.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.entryRangeReversed
(int startIndex, int endIndex) Returns entries (value and its score) by rank range in reverse order.entryRangeReversedAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all entries (value and its score) betweenstartScore
andendScore
in reversed order.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.entryRangeReversedAsync
(int startIndex, int endIndex) Returns entries (value and its score) by rank range in reverse order.entryScanIteratorAsync
(RedisClient client, long startPos, String pattern, int count) boolean
UseRExpirable.expire(Duration)
insteadboolean
Sets a timeout for this object.boolean
Sets an expiration date for this object.expireAsync
(long timeToLive, TimeUnit timeUnit) UseRExpirableAsync.expireAsync(Duration)
insteadexpireAsync
(long timeToLive, TimeUnit timeUnit, String param, String... keys) expireAsync
(Duration duration) Set a timeout for object.expireAsync
(Instant instant) Set an expire date for object.boolean
expireAt
(long timestamp) UseRExpirable.expire(Instant)
insteadboolean
UseRExpirable.expire(Instant)
insteadexpireAtAsync
(long timestamp) UseRExpirableAsync.expireAsync(Instant)
insteadexpireAtAsync
(long timestamp, String param, String... keys) expireAtAsync
(Date timestamp) UseRExpirableAsync.expireAsync(Instant)
insteadboolean
expireIfGreater
(Duration duration) Sets a timeout for this object only if it's greater than timeout set before.boolean
expireIfGreater
(Instant time) Sets an expiration date for this object only if it's greater than expiration date set before.expireIfGreaterAsync
(Duration duration) Sets a timeout for this object only if it's greater than timeout set before.expireIfGreaterAsync
(Instant time) Sets an expiration date for this object only if it's greater than expiration date set before.boolean
expireIfLess
(Duration duration) Sets a timeout for this object only if it's less than timeout set before.boolean
expireIfLess
(Instant time) Sets an expiration date for this object only if it's less than expiration date set before.expireIfLessAsync
(Duration duration) Sets a timeout for this object only if it's less than timeout set before.expireIfLessAsync
(Instant time) Sets an expiration date for this object only if it's less than expiration date set before.boolean
expireIfNotSet
(Duration duration) Sets a timeout for this object only if it hasn't been set before.boolean
expireIfNotSet
(Instant time) Sets an expiration date for this object only if it hasn't been set before.expireIfNotSetAsync
(Duration duration) Sets a timeout for this object only if it hasn't been set before.expireIfNotSetAsync
(Instant time) Sets an expiration date for this object only if it hasn't been set before.boolean
expireIfSet
(Duration duration) Sets a timeout for this object only if it has been already set.boolean
expireIfSet
(Instant time) Sets an expiration date for this object only if it has been already set.expireIfSetAsync
(Duration duration) Sets a timeout for this object only if it has been already set.expireIfSetAsync
(Instant time) Sets an expiration date for this object only if it has been already set.first()
Returns the head element ornull
if this sorted set is empty.Returns the head element ornull
if this sorted set is empty.Returns the head entry (value and its score) ornull
if this sorted set is empty.Returns the head entry (value and its score) ornull
if this sorted set is empty.Returns score of the tail element or returnsnull
if this sorted set is empty.Returns score of the head element or returnsnull
if this sorted set is empty.long
Expiration time of Redisson object that has a timeoutExpiration time of Redisson object that has a timeoutReturns scores of elements.Returns score of element ornull
if it doesn't exist.getScoreAsync
(Collection<V> elements) Returns scores of elements.getScoreAsync
(V o) Returns score of element ornull
if it doesn't exist.int
intersection
(String... names) Intersect provided ScoredSortedSets and store result to current ScoredSortedSetint
intersection
(Map<String, Double> nameWithWeight) Intersect provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSetint
intersection
(RScoredSortedSet.Aggregate aggregate, String... names) Intersect provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSetint
intersection
(RScoredSortedSet.Aggregate aggregate, Map<String, Double> nameWithWeight) Intersect provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSetintersectionAsync
(String... names) Intersect provided ScoredSortedSets and store result to current ScoredSortedSetintersectionAsync
(Map<String, Double> nameWithWeight) Intersect provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSetintersectionAsync
(RScoredSortedSet.Aggregate aggregate, String... names) Intersect provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSetintersectionAsync
(RScoredSortedSet.Aggregate aggregate, Map<String, Double> nameWithWeight) Intersect provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSetboolean
isEmpty()
Returnstrue
if this set is emptyiterator()
iterator
(int count) Returns an iterator over elements in this set.Returns an iterator over elements in this set.Returns an iterator over elements in this set.last()
Returns the tail element ornull
if this sorted set is empty.Returns the tail element ornull
if this sorted set is empty.Returns the tail entry (value and its score) ornull
if this sorted set is empty.Returns the tail entry (value and its score) ornull
if this sorted set is empty.Returns score of the head element or returnsnull
if this sorted set is empty.Returns score of the tail element or returnsnull
if this sorted set is empty.<KOut,
VOut>
RCollectionMapReduce<V,KOut, VOut> ReturnsRMapReduce
object associated with this objectRemoves and returns the head element ornull
if this sorted set is empty.pollFirst
(int count) Removes and returns the head elements of this sorted set.Removes and returns the head element ornull
if this sorted set is empty.Removes and returns the head elements.Removes and returns the head element ornull
if this sorted set is empty.pollFirstAsync
(int count) Removes and returns the head elements of this sorted set.pollFirstAsync
(long timeout, TimeUnit unit) Removes and returns the head element ornull
if this sorted set is empty.pollFirstAsync
(Duration duration, int count) Removes and returns the head elements.List<ScoredEntry<V>>
pollFirstEntries
(int count) Removes and returns the head entries (value and its score) of this sorted set.List<ScoredEntry<V>>
pollFirstEntries
(Duration duration, int count) Removes and returns the head entries (value and its score).RFuture<List<ScoredEntry<V>>>
pollFirstEntriesAsync
(int count) Removes and returns the head entries (value and its score) of this sorted set.RFuture<List<ScoredEntry<V>>>
pollFirstEntriesAsync
(Duration duration, int count) Removes and returns the head entries (value and its score).pollFirstEntriesFromAny
(int count, String... queueNames) Removes and returns first available head entries of any sorted set including this one.pollFirstEntriesFromAny
(Duration duration, int count, String... queueNames) Removes and returns first available head entries of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.pollFirstEntriesFromAnyAsync
(int count, String... queueNames) Removes and returns first available head elements of any sorted set including this one.pollFirstEntriesFromAnyAsync
(Duration duration, int count, String... queueNames) Removes and returns first available head elements of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.Removes and returns the head entry (value and its score) ornull
if this sorted set is empty.Removes and returns the head entry (value and its score) ornull
if this sorted set is empty.pollFirstFromAny
(int count, String... queueNames) Removes and returns first available head elements of any sorted set including this one.pollFirstFromAny
(long timeout, TimeUnit unit, String... queueNames) Removes and returns first available head element of any sorted set, waiting up to the specified wait time if necessary for an element to become available in any of defined sorted sets including this one.pollFirstFromAny
(Duration duration, int count, String... queueNames) Removes and returns first available head elements of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.pollFirstFromAnyAsync
(int count, String... queueNames) Removes and returns first available head elements of any sorted set including this one.pollFirstFromAnyAsync
(long timeout, TimeUnit unit, String... queueNames) Removes and returns first available head element of any sorted set, waiting up to the specified wait time if necessary for an element to become available in any of defined sorted sets including this one.pollFirstFromAnyAsync
(Duration duration, int count, String... queueNames) Removes and returns first available head elements of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.pollLast()
Removes and returns the tail element ornull
if this sorted set is empty.pollLast
(int count) Removes and returns the tail elements of this sorted set.Removes and returns the tail element ornull
if this sorted set is empty.Removes and returns the tail elements.Removes and returns the tail element ornull
if this sorted set is empty.pollLastAsync
(int count) Removes and returns the tail elements of this sorted set.pollLastAsync
(long timeout, TimeUnit unit) Removes and returns the tail element ornull
if this sorted set is empty.pollLastAsync
(Duration duration, int count) Removes and returns the tail elements.List<ScoredEntry<V>>
pollLastEntries
(int count) Removes and returns the tail entries (value and its score) of this sorted set.List<ScoredEntry<V>>
pollLastEntries
(Duration duration, int count) Removes and returns the head entries (value and its score).RFuture<List<ScoredEntry<V>>>
pollLastEntriesAsync
(int count) Removes and returns the tail entries (value and its score) of this sorted set.RFuture<List<ScoredEntry<V>>>
pollLastEntriesAsync
(Duration duration, int count) Removes and returns the head entries (value and its score).pollLastEntriesFromAny
(int count, String... queueNames) Removes and returns first available tail entries of any sorted set including this one.pollLastEntriesFromAny
(Duration duration, int count, String... queueNames) Removes and returns first available tail entries of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.pollLastEntriesFromAnyAsync
(int count, String... queueNames) Removes and returns first available tail entries of any sorted set including this one.pollLastEntriesFromAnyAsync
(Duration duration, int count, String... queueNames) Removes and returns first available tail entries of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.Removes and returns the tail entry (value and its score) ornull
if this sorted set is empty.Removes and returns the tail entry (value and its score) ornull
if this sorted set is empty.pollLastFromAny
(int count, String... queueNames) Removes and returns first available tail elements of any sorted set including this one.pollLastFromAny
(long timeout, TimeUnit unit, String... queueNames) Removes and returns first available tail element of any sorted set, waiting up to the specified wait time if necessary for an element to become available in any of defined sorted sets including this one.pollLastFromAny
(Duration duration, int count, String... queueNames) Removes and returns first available tail elements of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.pollLastFromAnyAsync
(int count, String... queueNames) Removes and returns first available tail elements of any sorted set including this one.pollLastFromAnyAsync
(long timeout, TimeUnit unit, String... queueNames) Removes and returns first available tail element of any sorted set, waiting up to the specified wait time if necessary for an element to become available in any of defined sorted sets including this one.pollLastFromAnyAsync
(Duration duration, int count, String... queueNames) Removes and returns first available tail elements of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.random()
Returns random element from this sorted setrandom
(int count) Returns random elements from this sorted set limited bycount
Returns random element from this sorted setrandomAsync
(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
rangeTo
(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Stores to defined ScoredSortedSet values betweenstartScore
andendScore
.int
rangeTo
(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Stores to defined ScoredSortedSet values betweenstartScore
andendScore
.int
Stores to defined ScoredSortedSet values by rank range.rangeToAsync
(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Stores to defined ScoredSortedSet values betweenstartScore
andendScore
.rangeToAsync
(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Stores to defined ScoredSortedSet values betweenstartScore
andendScore
.rangeToAsync
(String destName, int startIndex, int endIndex) Stores to defined ScoredSortedSet values by rank range.Returns rank of value, with the ranks ordered from low to high.Returns rank of value, with the scores ordered from low to high.Returns rank and score of specifiedvalue
, with the ranks ordered from low to high.rankEntryAsync
(V o) Returns rank and score of specifiedvalue
, with the ranks ordered from low to high.readAll()
Read all values at once.Read all values at once.Diff ScoredSortedSets specified by name with current ScoredSortedSet without state change.readDiffAsync
(String... names) Diff ScoredSortedSets specified by name with current ScoredSortedSet without state change.readIntersection
(String... names) Intersect provided ScoredSortedSets with current ScoredSortedSet without state changereadIntersection
(Map<String, Double> nameWithWeight) Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet without state changereadIntersection
(RScoredSortedSet.Aggregate aggregate, String... names) Intersect provided ScoredSortedSets with current ScoredSortedSet using defined aggregation method without state changereadIntersection
(RScoredSortedSet.Aggregate aggregate, Map<String, Double> nameWithWeight) Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet using defined aggregation method without state changereadIntersectionAsync
(String... names) Intersect provided ScoredSortedSets with current ScoredSortedSet without state changereadIntersectionAsync
(Map<String, Double> nameWithWeight) Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet without state changereadIntersectionAsync
(RScoredSortedSet.Aggregate aggregate, String... names) Intersect provided ScoredSortedSets with current ScoredSortedSet using defined aggregation method without state changereadIntersectionAsync
(RScoredSortedSet.Aggregate aggregate, Map<String, Double> nameWithWeight) Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet using defined aggregation method without state change<T> Collection<T>
Read data in sorted view<T> Collection<T>
Read data in sorted viewRead data in sorted viewRead data in sorted viewRead data in sorted viewRead data in sorted view<T> Collection<T>
readSortAlpha
(String byPattern, List<String> getPatterns, SortOrder order) Read data in sorted view lexicographically<T> Collection<T>
readSortAlpha
(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Read data in sorted view lexicographicallyreadSortAlpha
(String byPattern, SortOrder order) Read data in sorted view lexicographicallyreadSortAlpha
(String byPattern, SortOrder order, int offset, int count) Read data in sorted view lexicographicallyreadSortAlpha
(SortOrder order) Read data in sorted view lexicographicallyreadSortAlpha
(SortOrder order, int offset, int count) Read data in sorted view lexicographically<T> RFuture<Collection<T>>
readSortAlphaAsync
(String byPattern, List<String> getPatterns, SortOrder order) Read data in sorted view lexicographically<T> RFuture<Collection<T>>
readSortAlphaAsync
(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Read data in sorted view lexicographicallyreadSortAlphaAsync
(String byPattern, SortOrder order) Read data in sorted view lexicographicallyreadSortAlphaAsync
(String byPattern, SortOrder order, int offset, int count) Read data in sorted view lexicographicallyreadSortAlphaAsync
(SortOrder order) Read data in sorted view lexicographicallyreadSortAlphaAsync
(SortOrder order, int offset, int count) Read data in sorted view lexicographically<T> RFuture<Collection<T>>
readSortAsync
(String byPattern, List<String> getPatterns, SortOrder order) Read data in sorted view<T> RFuture<Collection<T>>
readSortAsync
(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Read data in sorted viewreadSortAsync
(String byPattern, SortOrder order) Read data in sorted viewreadSortAsync
(String byPattern, SortOrder order, int offset, int count) Read data in sorted viewreadSortAsync
(SortOrder order) Read data in sorted viewreadSortAsync
(SortOrder order, int offset, int count) Read data in sorted viewUnion ScoredSortedSets specified by name with current ScoredSortedSet without state change.Union provided ScoredSortedSets mapped to weight multiplier and current ScoredSortedSet without state change.readUnion
(RScoredSortedSet.Aggregate aggregate, String... names) Union ScoredSortedSets specified by name with defined aggregation method and current ScoredSortedSet without state change.readUnion
(RScoredSortedSet.Aggregate aggregate, Map<String, Double> nameWithWeight) Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and current ScoredSortedSet without state changereadUnionAsync
(String... names) Union ScoredSortedSets specified by name with current ScoredSortedSet without state change.readUnionAsync
(Map<String, Double> nameWithWeight) Union provided ScoredSortedSets mapped to weight multiplier and current ScoredSortedSet without state change.readUnionAsync
(RScoredSortedSet.Aggregate aggregate, String... names) Union ScoredSortedSets specified by name with defined aggregation method and current ScoredSortedSet without state change.readUnionAsync
(RScoredSortedSet.Aggregate aggregate, Map<String, Double> nameWithWeight) Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and current ScoredSortedSet without state changelong
Remaining time to live of Redisson object that has a timeoutRemaining time to live of Redisson object that has a timeoutboolean
Removes a single instance of the specified element from this sorted set, if it is present.boolean
removeAll
(Collection<?> c) Removes all of this sorted set's elements that are also contained in the specified collection.removeAllAsync
(Collection<?> c) Removes all of this sorted set's elements that are also contained in the specified collection.removeAsync
(Object object) Removes a single instance of the specified element from this sorted set, if it is present.void
removeListener
(int listenerId) Removes object event listenerremoveListenerAsync
(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
Replaces a previousoldObject
with anewObject
.replaceAsync
(V oldObject, V newObject) Replaces a previousoldObject
with anewObject
.boolean
retainAll
(Collection<?> c) Retains only the elements in this sorted set that are contained in the specified collection.retainAllAsync
(Collection<?> c) Retains only the elements in this sorted set that are contained in the specified collection.int
revRangeTo
(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Stores to defined ScoredSortedSet values in reversed order betweenstartScore
andendScore
.int
revRangeTo
(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Stores to defined ScoredSortedSet values in reversed order betweenstartScore
andendScore
.int
revRangeTo
(String destName, int startIndex, int endIndex) Stores to defined ScoredSortedSet values in reversed order by rank range.revRangeToAsync
(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Stores to defined ScoredSortedSet values in reversed order betweenstartScore
andendScore
.revRangeToAsync
(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Stores to defined ScoredSortedSet values in reversed order betweenstartScore
andendScore
.revRangeToAsync
(String destName, int startIndex, int endIndex) Stores to defined ScoredSortedSet values in reversed order by rank range.revRank
(Collection<V> elements) Returns ranks of elements, with the scores ordered from high to low.Returns rank of value, with the ranks ordered from high to low.revRankAsync
(Collection<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.revRankEntry
(V o) Returns rank and score of specifiedvalue
, with the ranks ordered from high to low.Returns rank and score of specifiedvalue
, with the ranks ordered from high to low.scanIteratorAsync
(RedisClient client, long startPos, String pattern, int count) int
size()
Returns size of this set.Returns size of this set.int
Sort data and store todestName
listint
sortTo
(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Sort data and store todestName
listint
Sort data and store todestName
listint
Sort data and store todestName
listint
Sort data and store todestName
listint
Sort data and store todestName
listSort data and store todestName
listsortToAsync
(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Sort data and store todestName
listsortToAsync
(String destName, String byPattern, SortOrder order) Sort data and store todestName
listsortToAsync
(String destName, String byPattern, SortOrder order, int offset, int count) Sort data and store todestName
listsortToAsync
(String destName, SortOrder order) Sort data and store todestName
listsortToAsync
(String destName, SortOrder order, int offset, int count) Sort data and store todestName
liststream()
Returns stream of elements in this set.stream
(int count) Returns stream of elements in this set.Returns stream of elements in this set.Returns stream of elements in this set.int
subscribeOnFirstElements
(Consumer<V> consumer) Subscribes on first elements appeared in this set.int
subscribeOnLastElements
(Consumer<V> consumer) Subscribes on last elements appeared in this set.Removes and returns the head element waiting if necessary for an element to become available.Removes and returns the head element waiting if necessary for an element to become available.takeLast()
Removes and returns the tail element waiting if necessary for an element to become available.Removes and returns the tail element waiting if necessary for an element to become available.Object[]
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
UseRScoredSortedSet.addIfAbsent(double, Object)
insteadtryAddAsync
(double score, V object) int
Union provided ScoredSortedSets and store result to current ScoredSortedSetint
Union provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSetint
union
(RScoredSortedSet.Aggregate aggregate, String... names) Union provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSetint
union
(RScoredSortedSet.Aggregate aggregate, Map<String, Double> nameWithWeight) Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSetunionAsync
(String... names) Union provided ScoredSortedSets and store result to current ScoredSortedSetunionAsync
(Map<String, Double> nameWithWeight) Union provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSetunionAsync
(RScoredSortedSet.Aggregate aggregate, String... names) Union provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSetunionAsync
(RScoredSortedSet.Aggregate aggregate, Map<String, Double> 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.valueRange
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all values betweenstartScore
andendScore
.valueRange
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all values betweenstartScore
andendScore
.valueRange
(int startIndex, int endIndex) Returns values by rank range.valueRangeAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all values betweenstartScore
andendScore
.valueRangeAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all values betweenstartScore
andendScore
.valueRangeAsync
(int startIndex, int endIndex) Returns values by rank range.valueRangeReversed
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all values betweenstartScore
andendScore
in reversed order.valueRangeReversed
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all values betweenstartScore
andendScore
in reversed order.valueRangeReversed
(int startIndex, int endIndex) Returns values by rank range in reverse order.valueRangeReversedAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all values betweenstartScore
andendScore
in reversed order.valueRangeReversedAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all values betweenstartScore
andendScore
in reversed order.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, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, getServiceManager, getSubscribeService, isExists, isExistsAsync, map, migrate, migrateAsync, move, moveAsync, prefixName, 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLive
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, 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 Details
-
RedissonScoredSortedSet
public RedissonScoredSortedSet(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson) -
RedissonScoredSortedSet
public RedissonScoredSortedSet(Codec codec, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
-
-
Method Details
-
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
Description copied from interface:RScoredSortedSet
Read all values at once.- Specified by:
readAll
in interfaceRScoredSortedSet<V>
- Returns:
- values
-
readAllAsync
Description copied from interface:RScoredSortedSetAsync
Read all values at once.- Specified by:
readAllAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- values
-
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
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
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
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
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
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
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
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
-
pollFirstEntry
Description copied from interface:RScoredSortedSet
Removes and returns the head entry (value and its score) ornull
if this sorted set is empty.- Specified by:
pollFirstEntry
in interfaceRScoredSortedSet<V>
- Returns:
- the head entry,
or
null
if this sorted set is empty
-
pollLastEntry
Description copied from interface:RScoredSortedSet
Removes and returns the tail entry (value and its score) ornull
if this sorted set is empty.- Specified by:
pollLastEntry
in interfaceRScoredSortedSet<V>
- Returns:
- the tail entry or
null
if this sorted set is empty
-
pollFirstEntryAsync
Description copied from interface:RScoredSortedSetAsync
Removes and returns the head entry (value and its score) ornull
if this sorted set is empty.- Specified by:
pollFirstEntryAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- the head entry,
or
null
if this sorted set is empty
-
pollLastEntryAsync
Description copied from interface:RScoredSortedSetAsync
Removes and returns the tail entry (value and its score) ornull
if this sorted set is empty.- Specified by:
pollLastEntryAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- the tail entry or
null
if this sorted set is empty
-
pollFirstEntries
Description copied from interface:RScoredSortedSet
Removes and returns the head entries (value and its score) of this sorted set.- Specified by:
pollFirstEntries
in interfaceRScoredSortedSet<V>
- Parameters:
count
- entries amount- Returns:
- the head entries of this sorted set
-
pollLastEntries
Description copied from interface:RScoredSortedSet
Removes and returns the tail entries (value and its score) of this sorted set.- Specified by:
pollLastEntries
in interfaceRScoredSortedSet<V>
- Parameters:
count
- entries amount- Returns:
- the tail entries of this sorted set
-
pollFirstEntriesAsync
Description copied from interface:RScoredSortedSetAsync
Removes and returns the head entries (value and its score) of this sorted set.- Specified by:
pollFirstEntriesAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
count
- entries amount- Returns:
- the head entries of this sorted set
-
pollLastEntriesAsync
Description copied from interface:RScoredSortedSetAsync
Removes and returns the tail entries (value and its score) of this sorted set.- Specified by:
pollLastEntriesAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
count
- entries amount- Returns:
- the tail entries of this sorted set
-
pollFirstEntries
Description copied from interface:RScoredSortedSet
Removes and returns the head entries (value and its score).Requires Redis 7.0.0 and higher.
- Specified by:
pollFirstEntries
in interfaceRScoredSortedSet<V>
- Parameters:
duration
- how long to wait before giving upcount
- entries amount- Returns:
- the head entries
-
pollLastEntries
Description copied from interface:RScoredSortedSet
Removes and returns the head entries (value and its score).Requires Redis 7.0.0 and higher.
- Specified by:
pollLastEntries
in interfaceRScoredSortedSet<V>
- Parameters:
duration
- how long to wait before giving upcount
- entries amount- Returns:
- the tail entries
-
pollFirstEntriesAsync
Description copied from interface:RScoredSortedSetAsync
Removes and returns the head entries (value and its score).Requires Redis 7.0.0 and higher.
- Specified by:
pollFirstEntriesAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
duration
- how long to wait before giving upcount
- entries amount- Returns:
- the head entries
-
pollLastEntriesAsync
Description copied from interface:RScoredSortedSetAsync
Removes and returns the head entries (value and its score).Requires Redis 7.0.0 and higher.
- Specified by:
pollLastEntriesAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
duration
- how long to wait before giving upcount
- entries amount- Returns:
- the tail entries
-
pollFirst
Description copied from interface:RScoredSortedSet
Removes and returns the head element ornull
if this sorted set is empty.Requires Redis 5.0.0 and higher.
- 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
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
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
- name of queues- Returns:
- the head element, or
null
if all sorted sets are empty
-
pollFirstFromAnyAsync
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
- name of queues- Returns:
- the head element, or
null
if all sorted sets are empty
-
pollFirstFromAny
Description copied from interface:RScoredSortedSet
Removes and returns first available head elements of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.Requires Redis 7.0.0 and higher.
- Specified by:
pollFirstFromAny
in interfaceRScoredSortedSet<V>
- Parameters:
duration
- how long to wait before giving upcount
- elements amountqueueNames
- name of queues- Returns:
- the head elements
-
pollFirstFromAnyAsync
Description copied from interface:RScoredSortedSetAsync
Removes and returns first available head elements of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.Requires Redis 7.0.0 and higher.
- Specified by:
pollFirstFromAnyAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
duration
- how long to wait before giving upcount
- elements amountqueueNames
- name of queues- Returns:
- the head elements
-
pollFirstFromAny
Description copied from interface:RScoredSortedSet
Removes and returns first available head elements of any sorted set including this one.Requires Redis 7.0.0 and higher.
- Specified by:
pollFirstFromAny
in interfaceRScoredSortedSet<V>
- Parameters:
count
- elements amountqueueNames
- name of queues- Returns:
- the head elements
-
pollFirstFromAnyAsync
Description copied from interface:RScoredSortedSetAsync
Removes and returns first available head elements of any sorted set including this one.Requires Redis 7.0.0 and higher.
- Specified by:
pollFirstFromAnyAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
count
- elements amountqueueNames
- name of queues- Returns:
- the head elements
-
pollFirstEntriesFromAny
Description copied from interface:RScoredSortedSet
Removes and returns first available head entries of any sorted set including this one.Requires Redis 7.0.0 and higher.
- Specified by:
pollFirstEntriesFromAny
in interfaceRScoredSortedSet<V>
- Parameters:
count
- entries amountqueueNames
- name of queues- Returns:
- the head elements
-
pollFirstEntriesFromAnyAsync
public RFuture<Map<String,Map<V, pollFirstEntriesFromAnyAsyncDouble>>> (int count, String... queueNames) Description copied from interface:RScoredSortedSetAsync
Removes and returns first available head elements of any sorted set including this one.Requires Redis 7.0.0 and higher.
- Specified by:
pollFirstEntriesFromAnyAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
count
- elements amountqueueNames
- name of queues- Returns:
- the head elements
-
pollFirstEntriesFromAny
public Map<String,Map<V, pollFirstEntriesFromAnyDouble>> (Duration duration, int count, String... queueNames) Description copied from interface:RScoredSortedSet
Removes and returns first available head entries of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.Requires Redis 7.0.0 and higher.
- Specified by:
pollFirstEntriesFromAny
in interfaceRScoredSortedSet<V>
- Parameters:
duration
- how long to wait before giving upcount
- entries amountqueueNames
- name of queues- Returns:
- the head entries
-
pollFirstEntriesFromAnyAsync
public RFuture<Map<String,Map<V, pollFirstEntriesFromAnyAsyncDouble>>> (Duration duration, int count, String... queueNames) Description copied from interface:RScoredSortedSetAsync
Removes and returns first available head elements of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.Requires Redis 7.0.0 and higher.
- Specified by:
pollFirstEntriesFromAnyAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
duration
- how long to wait before giving upcount
- elements amountqueueNames
- name of queues- Returns:
- the head elements
-
pollLastFromAny
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
- name of queues- Returns:
- the tail element, or
null
if all sorted sets are empty
-
pollLastFromAnyAsync
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
- name of queues- Returns:
- the tail element, or
null
if all sorted sets are empty
-
pollLastFromAny
Description copied from interface:RScoredSortedSet
Removes and returns first available tail elements of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.Requires Redis 7.0.0 and higher.
- Specified by:
pollLastFromAny
in interfaceRScoredSortedSet<V>
- Parameters:
duration
- how long to wait before giving upcount
- elements amountqueueNames
- name of queues- Returns:
- the tail elements
-
pollLastFromAnyAsync
Description copied from interface:RScoredSortedSetAsync
Removes and returns first available tail elements of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.Requires Redis 7.0.0 and higher.
- Specified by:
pollLastFromAnyAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
duration
- how long to wait before giving upcount
- elements amountqueueNames
- name of queues- Returns:
- the tail elements
-
pollLastFromAny
Description copied from interface:RScoredSortedSet
Removes and returns first available tail elements of any sorted set including this one.Requires Redis 7.0.0 and higher.
- Specified by:
pollLastFromAny
in interfaceRScoredSortedSet<V>
- Parameters:
count
- elements amountqueueNames
- name of queues- Returns:
- the tail elements
-
pollLastFromAnyAsync
Description copied from interface:RScoredSortedSetAsync
Removes and returns first available tail elements of any sorted set including this one.Requires Redis 7.0.0 and higher.
- Specified by:
pollLastFromAnyAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
count
- elements amountqueueNames
- name of queues- Returns:
- the tail elements
-
pollLastEntriesFromAny
Description copied from interface:RScoredSortedSet
Removes and returns first available tail entries of any sorted set including this one.Requires Redis 7.0.0 and higher.
- Specified by:
pollLastEntriesFromAny
in interfaceRScoredSortedSet<V>
- Parameters:
count
- entries amountqueueNames
- name of queues- Returns:
- the head entries
-
pollLastEntriesFromAnyAsync
public RFuture<Map<String,Map<V, pollLastEntriesFromAnyAsyncDouble>>> (int count, String... queueNames) Description copied from interface:RScoredSortedSetAsync
Removes and returns first available tail entries of any sorted set including this one.Requires Redis 7.0.0 and higher.
- Specified by:
pollLastEntriesFromAnyAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
count
- entries amountqueueNames
- name of queues- Returns:
- the head entries
-
pollLastEntriesFromAny
public Map<String,Map<V, pollLastEntriesFromAnyDouble>> (Duration duration, int count, String... queueNames) Description copied from interface:RScoredSortedSet
Removes and returns first available tail entries of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.Requires Redis 7.0.0 and higher.
- Specified by:
pollLastEntriesFromAny
in interfaceRScoredSortedSet<V>
- Parameters:
duration
- how long to wait before giving upcount
- entries amountqueueNames
- name of queues- Returns:
- the tail entries
-
pollLastEntriesFromAnyAsync
public RFuture<Map<String,Map<V, pollLastEntriesFromAnyAsyncDouble>>> (Duration duration, int count, String... queueNames) Description copied from interface:RScoredSortedSetAsync
Removes and returns first available tail entries of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.Requires Redis 7.0.0 and higher.
- Specified by:
pollLastEntriesFromAnyAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
duration
- how long to wait before giving upcount
- entries amountqueueNames
- name of queues- Returns:
- the tail entries
-
pollLast
Description copied from interface:RScoredSortedSet
Removes and returns the tail element ornull
if this sorted set is empty.Requires Redis 5.0.0 and higher.
- 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
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
-
pollFirst
Description copied from interface:RScoredSortedSet
Removes and returns the head elements.Requires Redis 7.0.0 and higher.
- Specified by:
pollFirst
in interfaceRScoredSortedSet<V>
- Parameters:
duration
- how long to wait before giving upcount
- entries amount- Returns:
- the head elements
-
pollFirstAsync
Description copied from interface:RScoredSortedSetAsync
Removes and returns the head elements.Requires Redis 7.0.0 and higher.
- Specified by:
pollFirstAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
duration
- how long to wait before giving upcount
- elements amount- Returns:
- the head elements
-
pollLast
Description copied from interface:RScoredSortedSet
Removes and returns the tail elements.Requires Redis 7.0.0 and higher.
- Specified by:
pollLast
in interfaceRScoredSortedSet<V>
- Parameters:
duration
- how long to wait before giving up- Returns:
- the tail elements
-
pollLastAsync
Description copied from interface:RScoredSortedSetAsync
Removes and returns the tail elements.Requires Redis 7.0.0 and higher.
- Specified by:
pollLastAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
duration
- how long to wait before giving upcount
- elements amount- Returns:
- the tail elements
-
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
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
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
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
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
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
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
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
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
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
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
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
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
Description copied from interface:RScoredSortedSet
UseRScoredSortedSet.addIfAbsent(double, Object)
instead- Specified by:
tryAdd
in interfaceRScoredSortedSet<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
true
if element added andfalse
if not.
-
addIfExists
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
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
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
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
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
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
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
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
-
firstEntry
Description copied from interface:RScoredSortedSet
Returns the head entry (value and its score) ornull
if this sorted set is empty.- Specified by:
firstEntry
in interfaceRScoredSortedSet<V>
- Returns:
- the head entry or
null
if this sorted set is empty
-
firstEntryAsync
Description copied from interface:RScoredSortedSetAsync
Returns the head entry (value and its score) ornull
if this sorted set is empty.- Specified by:
firstEntryAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- the head entry or
null
if this sorted set is empty
-
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
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
-
lastEntry
Description copied from interface:RScoredSortedSet
Returns the tail entry (value and its score) ornull
if this sorted set is empty.- Specified by:
lastEntry
in interfaceRScoredSortedSet<V>
- Returns:
- the tail entry or
null
if this sorted set is empty
-
lastEntryAsync
Description copied from interface:RScoredSortedSetAsync
Returns the tail entry (value and its score) ornull
if this sorted set is empty.- Specified by:
lastEntryAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- the tail entry or
null
if this sorted set is empty
-
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
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
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
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
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
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
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
-
addAllIfAbsent
Description copied from interface:RScoredSortedSet
Adds elements to this set only if they haven't been added before.Requires Redis 3.0.2 and higher.
- Specified by:
addAllIfAbsent
in interfaceRScoredSortedSet<V>
- Parameters:
objects
- map of elements to add- Returns:
- amount of added elements
-
addAllIfAbsentAsync
Description copied from interface:RScoredSortedSetAsync
Adds elements to this set only if they haven't been added before.Requires Redis 3.0.2 and higher.
- Specified by:
addAllIfAbsentAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
objects
- map of elements to add- Returns:
- amount of added elements
-
addAllIfExist
Description copied from interface:RScoredSortedSet
Adds elements to this set only if they already exist.Requires Redis 3.0.2 and higher.
- Specified by:
addAllIfExist
in interfaceRScoredSortedSet<V>
- Parameters:
objects
- map of elements to add- Returns:
- amount of added elements
-
addAllIfExistAsync
Description copied from interface:RScoredSortedSetAsync
Adds elements to this set only if they already exist.Requires Redis 3.0.2 and higher.
- Specified by:
addAllIfExistAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
objects
- map of elements to add- Returns:
- amount of added elements
-
addAllIfGreater
Description copied from interface:RScoredSortedSet
Adds elements to this set only if new scores greater than current score of existed elements.Requires Redis 6.2.0 and higher.
- Specified by:
addAllIfGreater
in interfaceRScoredSortedSet<V>
- Parameters:
objects
- map of elements to add- Returns:
- amount of added elements
-
addAllIfGreaterAsync
Description copied from interface:RScoredSortedSetAsync
Adds elements to this set only if new scores greater than current score of existed elements.Requires Redis 6.2.0 and higher.
- Specified by:
addAllIfGreaterAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
objects
- map of elements to add- Returns:
- amount of added elements
-
addAllIfLess
Description copied from interface:RScoredSortedSet
Adds elements to this set only if new scores less than current score of existed elements.Requires Redis 6.2.0 and higher.
- Specified by:
addAllIfLess
in interfaceRScoredSortedSet<V>
- Parameters:
objects
- map of elements to add- Returns:
- amount of added elements
-
addAllIfLessAsync
Description copied from interface:RScoredSortedSetAsync
Adds elements to this set only if new scores less than current score of existed elements.Requires Redis 6.2.0 and higher.
- Specified by:
addAllIfLessAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
objects
- map of elements to add- Returns:
- amount of added elements
-
tryAddAsync
Description copied from interface:RScoredSortedSetAsync
- Specified by:
tryAddAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
true
if element has added andfalse
if not.
-
addIfAbsent
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:
addIfAbsent
in interfaceRScoredSortedSet<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
true
if element added andfalse
if not.
-
addIfAbsentAsync
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:
addIfAbsentAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
score
- - object scoreobject
- - object itself- Returns:
true
if element added andfalse
if not.
-
remove
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
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 RFuture<Integer> 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
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
-
replace
Description copied from interface:RScoredSortedSet
Replaces a previousoldObject
with anewObject
. Returnsfalse
if previous object doesn't exist.- Specified by:
replace
in interfaceRScoredSortedSet<V>
- Parameters:
oldValue
- old objectnewValue
- new object- Returns:
true
if object has been replaced otherwisefalse
.
-
replaceAsync
Description copied from interface:RScoredSortedSetAsync
Replaces a previousoldObject
with anewObject
. Returnsfalse
if previous object doesn't exist.- Specified by:
replaceAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
oldObject
- old objectnewObject
- new object- Returns:
true
if object has been replaced otherwisefalse
.
-
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
Description copied from interface:RScoredSortedSetAsync
Returns size of this set.- Specified by:
sizeAsync
in interfaceRScoredSortedSetAsync<V>
- Returns:
- size
-
contains
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
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
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
Description copied from interface:RScoredSortedSet
Returns scores of elements.- Specified by:
getScore
in interfaceRScoredSortedSet<V>
- Parameters:
keys
- - elements- Returns:
- element scores
-
getScoreAsync
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
Description copied from interface:RScoredSortedSetAsync
Returns scores of elements.- Specified by:
getScoreAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
elements
- - elements- Returns:
- element scores
-
rank
Description copied from interface:RScoredSortedSet
Returns rank of value, with the ranks ordered from low to high.- Specified by:
rank
in interfaceRScoredSortedSet<V>
- Parameters:
o
- - object- Returns:
- rank or
null
if value does not exist
-
rankAsync
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
-
rankEntry
Description copied from interface:RScoredSortedSet
Returns rank and score of specifiedvalue
, with the ranks ordered from low to high.- Specified by:
rankEntry
in interfaceRScoredSortedSet<V>
- Parameters:
o
- object- Returns:
- ranked entry or
null
if value does not exist
-
rankEntryAsync
Description copied from interface:RScoredSortedSetAsync
Returns rank and score of specifiedvalue
, with the ranks ordered from low to high.- Specified by:
rankEntryAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
o
- object- Returns:
- ranked entry or
null
if value does not exist
-
scanIteratorAsync
public RFuture<ScanResult<Object>> scanIteratorAsync(RedisClient client, long startPos, String pattern, int count) -
iterator
-
iterator
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
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
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
-
entryIterator
Description copied from interface:RScoredSortedSet
Returns an iterator over entries (value and its score) in this set.- Specified by:
entryIterator
in interfaceRScoredSortedSet<V>
- Returns:
- iterator
-
entryIterator
Description copied from interface:RScoredSortedSet
Returns an iterator over entries (value and its score) in this set. Ifpattern
is not null then only entries match this pattern are loaded.- Specified by:
entryIterator
in interfaceRScoredSortedSet<V>
- Parameters:
pattern
- search pattern- Returns:
- iterator
-
entryIterator
Description copied from interface:RScoredSortedSet
Returns an iterator over entries (value and its score) in this set. Entries are loaded in batch. Batch size is defined bycount
param.- Specified by:
entryIterator
in interfaceRScoredSortedSet<V>
- Parameters:
count
- size of elements batch- Returns:
- iterator
-
entryIterator
Description copied from interface:RScoredSortedSet
Returns an iterator over entries (value and its score) in this set. Entries are loaded in batch. Batch size is defined bycount
param. If pattern is not null then only entries match this pattern are loaded.- Specified by:
entryIterator
in interfaceRScoredSortedSet<V>
- Parameters:
pattern
- search patterncount
- size of entries batch- Returns:
- iterator
-
entryScanIteratorAsync
public RFuture<ScanResult<Object>> entryScanIteratorAsync(RedisClient client, long startPos, String pattern, int count) -
distributedIterator
Description copied from interface:RScoredSortedSet
Returns iterator over elements that match specified pattern. Iterator can be shared across multiple applications. Creating multiple iterators on the same object with this method will result in a single shared iterator. See RSet.distributedIterator(String, String, int) for creating different iterators.- Specified by:
distributedIterator
in interfaceRScoredSortedSet<V>
- Parameters:
pattern
- element pattern- Returns:
- shared elements iterator
-
distributedIterator
Description copied from interface:RScoredSortedSet
Returns element iterator that can be shared across multiple applications. Creating multiple iterators on the same object with this method will result in a single shared iterator. See RSet.distributedIterator(String, String, int) for creating different iterators.- Specified by:
distributedIterator
in interfaceRScoredSortedSet<V>
- Parameters:
count
- batch size- Returns:
- shared elements iterator
-
distributedIterator
Description copied from interface:RScoredSortedSet
Returns iterator over elements that match specified pattern. Iterator can be shared across multiple applications. Creating multiple iterators on the same object with this method will result in a single shared iterator. Iterator name must be resolved to the same hash slot as set name.- Specified by:
distributedIterator
in interfaceRScoredSortedSet<V>
- Parameters:
iteratorName
- redis object name to which cursor will be savedpattern
- element patterncount
- batch size- Returns:
- shared elements iterator
-
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 Collection<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 RFuture<Collection<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 Collection<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 RFuture<Collection<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 Collection<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 RFuture<Collection<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 Collection<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 RFuture<Collection<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 Collection<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 RFuture<Collection<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 Collection<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 Collection<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 RFuture<Collection<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 Collection<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 RFuture<Collection<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 RFuture<Collection<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
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
-
revRankEntry
Description copied from interface:RScoredSortedSet
Returns rank and score of specifiedvalue
, with the ranks ordered from high to low.- Specified by:
revRankEntry
in interfaceRScoredSortedSet<V>
- Parameters:
o
- object- Returns:
- ranked entry or
null
if value does not exist
-
revRankEntryAsync
Description copied from interface:RScoredSortedSetAsync
Returns rank and score of specifiedvalue
, with the ranks ordered from high to low.- Specified by:
revRankEntryAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
o
- object- Returns:
- ranked entry or
null
if value does not exist
-
revRank
Description copied from interface:RScoredSortedSet
Returns rank of value, with the ranks ordered from high to low.- Specified by:
revRank
in interfaceRScoredSortedSet<V>
- Parameters:
o
- - object- Returns:
- rank or
null
if value does not exist
-
revRankAsync
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
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 RFuture<Integer> 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
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
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
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
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
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
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
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 RFuture<Integer> intersectionAsync(RScoredSortedSet.Aggregate aggregate, Map<String, Double> 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
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
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
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 RFuture<Collection<V>> readIntersectionAsync(RScoredSortedSet.Aggregate aggregate, String... 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
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
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 Collection<V> readIntersection(RScoredSortedSet.Aggregate aggregate, Map<String, Double> 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 RFuture<Collection<V>> readIntersectionAsync(RScoredSortedSet.Aggregate aggregate, Map<String, Double> 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
-
countIntersection
Description copied from interface:RScoredSortedSet
Counts elements of set as a result of sets intersection with current set.Requires Redis 7.0.0 and higher.
- Specified by:
countIntersection
in interfaceRScoredSortedSet<V>
- Parameters:
names
- - name of sets- Returns:
- amount of elements
-
countIntersection
Description copied from interface:RScoredSortedSet
Counts elements of set as a result of sets intersection with current set.Requires Redis 7.0.0 and higher.
- Specified by:
countIntersection
in interfaceRScoredSortedSet<V>
- Parameters:
limit
- - sets intersection limitnames
- - name of sets- Returns:
- amount of elements
-
countIntersectionAsync
Description copied from interface:RScoredSortedSetAsync
Counts elements of set as a result of sets intersection with current set.Requires Redis 7.0.0 and higher.
- Specified by:
countIntersectionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
names
- - name of sets- Returns:
- amount of elements
-
countIntersectionAsync
Description copied from interface:RScoredSortedSetAsync
Counts elements of set as a result of sets intersection with current set.Requires Redis 7.0.0 and higher.
- Specified by:
countIntersectionAsync
in interfaceRScoredSortedSetAsync<V>
- Parameters:
limit
- - sets intersection limitnames
- - name of sets- Returns:
- amount of elements
-
union
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
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
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
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
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
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
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 RFuture<Integer> unionAsync(RScoredSortedSet.Aggregate aggregate, Map<String, Double> 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
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
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
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
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
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
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 Collection<V> readUnion(RScoredSortedSet.Aggregate aggregate, Map<String, Double> 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 RFuture<Collection<V>> readUnionAsync(RScoredSortedSet.Aggregate aggregate, Map<String, Double> 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
Description copied from interface:RSortable
Read data in sorted view -
readSortAsync
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
Description copied from interface:RSortable
Read data in sorted view -
readSortAsync
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
Description copied from interface:RSortable
Read data in sorted view -
readSortAsync
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
Description copied from interface:RSortable
Read data in sorted view -
readSortAsync
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
Description copied from interface:RSortable
Read data in sorted view -
readSortAsync
public <T> RFuture<Collection<T>> readSortAsync(String byPattern, List<String> 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> Collection<T> readSort(String byPattern, List<String> 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> RFuture<Collection<T>> readSortAsync(String byPattern, List<String> 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
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
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
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
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
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> Collection<T> readSortAlpha(String byPattern, List<String> 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
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
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
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
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> RFuture<Collection<T>> readSortAlphaAsync(String byPattern, List<String> 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> RFuture<Collection<T>> readSortAlphaAsync(String byPattern, List<String> 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
Description copied from interface:RSortable
Sort data and store todestName
list -
sortToAsync
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
Description copied from interface:RSortable
Sort data and store todestName
list -
sortToAsync
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
Description copied from interface:RSortable
Sort data and store todestName
list -
sortTo
Description copied from interface:RSortable
Sort data and store todestName
list -
sortToAsync
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 RFuture<Integer> sortToAsync(String destName, String 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
Description copied from interface:RSortable
Sort data and store todestName
list -
sortToAsync
public RFuture<Integer> sortToAsync(String destName, String byPattern, List<String> 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(String destName, String byPattern, List<String> 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 RFuture<Integer> sortToAsync(String destName, String byPattern, List<String> 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
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
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
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
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
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(String 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(String 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
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(String 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(String 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
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 RFuture<Integer> revRangeToAsync(String 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 RFuture<Integer> revRangeToAsync(String 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
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 RFuture<Integer> rangeToAsync(String 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 RFuture<Integer> rangeToAsync(String 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
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
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
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
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
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
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
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
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
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
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
Description copied from interface:RObject
Adds object event listener- Specified by:
addListener
in interfaceRObject
- Specified by:
addListener
in interfaceRScoredSortedSet<V>
- Overrides:
addListener
in classRedissonObject
- Parameters:
listener
- - object event listener- Returns:
- listener id
- See Also:
-
addListenerAsync
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:
-
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
Description copied from interface:RObjectAsync
Removes object event listener- Specified by:
removeListenerAsync
in interfaceRObjectAsync
- Overrides:
removeListenerAsync
in classRedissonObject
- Parameters:
listenerId
- - listener id
-
expire
Description copied from interface:RExpirable
UseRExpirable.expire(Duration)
instead- 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
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Duration)
instead- 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
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
Description copied from interface:RExpirable
Sets an expiration date for this 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
-
expireIfSet
Description copied from interface:RExpirable
Sets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSet
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSetAsync
Description copied from interface:RExpirableAsync
Sets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSet
Description copied from interface:RExpirable
Sets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSet
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSetAsync
Description copied from interface:RExpirableAsync
Sets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreater
Description copied from interface:RExpirable
Sets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreater
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreaterAsync
Description copied from interface:RExpirableAsync
Sets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLess
Description copied from interface:RExpirable
Sets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLess
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLessAsync
Description copied from interface:RExpirableAsync
Sets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
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
-
expire
Description copied from interface:RExpirable
Sets a timeout for this object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expire
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
Description copied from interface:RExpirableAsync
Set a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
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
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
-
expireIfSet
Description copied from interface:RExpirable
Sets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSet
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSetAsync
Description copied from interface:RExpirableAsync
Sets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSet
Description copied from interface:RExpirable
Sets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSet
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSetAsync
Description copied from interface:RExpirableAsync
Sets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreater
Description copied from interface:RExpirable
Sets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreater
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreaterAsync
Description copied from interface:RExpirableAsync
Sets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLess
Description copied from interface:RExpirable
Sets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLess
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLessAsync
Description copied from interface:RExpirableAsync
Sets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- 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
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
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.
-
getExpireTime
public long getExpireTime()Description copied from interface:RExpirable
Expiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTime
in interfaceRExpirable
- Returns:
- expiration time
-
getExpireTimeAsync
Description copied from interface:RExpirableAsync
Expiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTimeAsync
in interfaceRExpirableAsync
- Returns:
- expiration time
-
expireAsync
-
expireAtAsync
-
clearExpireAsync
-