Package org.redisson
Class RedissonLexSortedSet
- All Implemented Interfaces:
Iterable<String>
,Collection<String>
,Set<String>
,SortedSet<String>
,RCollectionAsync<String>
,RExpirable
,RExpirableAsync
,RLexSortedSet
,RLexSortedSetAsync
,RObject
,RObjectAsync
,RScoredSortedSet<String>
,RScoredSortedSetAsync<String>
,RSortable<Set<String>>
,RSortableAsync<Set<String>>
,RSortedSet<String>
Sorted set contained values of String type
- 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
ConstructorDescriptionRedissonLexSortedSet
(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends String> c) addAllAsync
(Collection<? extends String> c) Adds all elements contained in the specified collectionAdds element into this collection.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) Comparator
<? super String> int
Returns the number of elements betweenfromElement
andtoElement
.countAsync
(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive) Returns the number of elements betweenfromElement
andtoElement
.int
Returns the number of head values ending withtoElement
.countHeadAsync
(String toElement, boolean toInclusive) Returns the number of head values ending withtoElement
.int
Returns the number of tail values starting withfromElement
.countTailAsync
(String fromElement, boolean fromInclusive) Returns the number of tail values starting withfromElement
.distributedIterator
(String iteratorName, int count) Returns iterator over elements that match specified pattern.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.long
Returns expiration time of the object as the absolute Unix expiration timestamp in milliseconds.Returns expiration time of the object as the absolute Unix expiration timestamp in milliseconds.range
(int startIndex, int endIndex) Returns values by rank range.Returns values range starting withfromElement
and ending withtoElement
.range
(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive, int offset, int count) Returns values range starting withfromElement
and ending withtoElement
.rangeAsync
(int startIndex, int endIndex) Returns values by rank range.rangeAsync
(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive) Returns values range starting withfromElement
and ending withtoElement
.rangeAsync
(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive, int offset, int count) Returns values range starting withfromElement
and ending withtoElement
.Returns head values range ending withtoElement
.Returns head values range ending withtoElement
.rangeHeadAsync
(String toElement, boolean toInclusive) Returns head values range ending withtoElement
.rangeHeadAsync
(String toElement, boolean toInclusive, int offset, int count) Returns head values range ending withtoElement
.rangeHeadReversed
(String toElement, boolean toInclusive) Returns head values range in reverse order ending withtoElement
.rangeHeadReversed
(String toElement, boolean toInclusive, int offset, int count) Returns head values range in reverse order ending withtoElement
.rangeHeadReversedAsync
(String toElement, boolean toInclusive) Returns head values range in reverse order ending withtoElement
.rangeHeadReversedAsync
(String toElement, boolean toInclusive, int offset, int count) Returns head values range in reverse order ending withtoElement
.rangeReversed
(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive) Returns values range in reverse order starting withfromElement
and ending withtoElement
.rangeReversed
(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive, int offset, int count) Returns values range in reverse order starting withfromElement
and ending withtoElement
.rangeReversedAsync
(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive) Returns values range in reverse order starting withfromElement
and ending withtoElement
.rangeReversedAsync
(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive, int offset, int count) Returns values range in reverse order starting withfromElement
and ending withtoElement
.Returns tail values range starting withfromElement
.Returns tail values range starting withfromElement
.rangeTailAsync
(String fromElement, boolean fromInclusive) Returns tail values range starting withfromElement
.rangeTailAsync
(String fromElement, boolean fromInclusive, int offset, int count) Returns tail values range starting withfromElement
.rangeTailReversed
(String fromElement, boolean fromInclusive) Returns tail values range in reverse order starting withfromElement
.rangeTailReversed
(String fromElement, boolean fromInclusive, int offset, int count) Returns tail values range in reverse order starting withfromElement
.rangeTailReversedAsync
(String fromElement, boolean fromInclusive) Returns tail values range in reverse order starting withfromElement
.rangeTailReversedAsync
(String fromElement, boolean fromInclusive, int offset, int count) Returns tail values range in reverse order starting withfromElement
.long
Returns remaining time of the object in milliseconds.Returns remaining time of the object in milliseconds.int
removeRange
(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive) Removes values range starting withfromElement
and ending withtoElement
.removeRangeAsync
(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive) Removes values range starting withfromElement
and ending withtoElement
.int
removeRangeHead
(String toElement, boolean toInclusive) Removes head values range ending withtoElement
.removeRangeHeadAsync
(String toElement, boolean toInclusive) Removes head values range ending withtoElement
.int
removeRangeTail
(String fromElement, boolean fromInclusive) Removes tail values range starting withfromElement
.removeRangeTailAsync
(String fromElement, boolean fromInclusive) Removes tail values range starting withfromElement
.boolean
trySetComparator
(Comparator<? super String> comparator) Sets new comparator only if current set is emptyMethods inherited from class org.redisson.RedissonScoredSortedSet
add, addAll, addAllAsync, addAllIfAbsent, addAllIfAbsentAsync, addAllIfExist, addAllIfExistAsync, addAllIfGreater, addAllIfGreaterAsync, addAllIfLess, addAllIfLessAsync, addAndGetRank, addAndGetRankAsync, addAndGetRevRank, addAndGetRevRank, addAndGetRevRankAsync, addAndGetRevRankAsync, addAsync, addIfAbsent, addIfAbsentAsync, addIfExists, addIfExistsAsync, addIfGreater, addIfGreaterAsync, addIfLess, addIfLessAsync, addListener, addListenerAsync, addScore, addScoreAndGetRank, addScoreAndGetRankAsync, addScoreAndGetRevRank, addScoreAndGetRevRankAsync, addScoreAsync, clear, contains, containsAll, containsAllAsync, containsAsync, count, countAsync, countIntersection, countIntersection, countIntersectionAsync, countIntersectionAsync, diff, diffAsync, distributedIterator, distributedIterator, distributedIterator, entryIterator, entryIterator, entryIterator, entryIterator, entryRange, entryRange, entryRange, entryRangeAsync, entryRangeAsync, entryRangeAsync, entryRangeReversed, entryRangeReversed, entryRangeReversed, entryRangeReversedAsync, entryRangeReversedAsync, entryRangeReversedAsync, entryScanIteratorAsync, first, firstAsync, firstEntry, firstEntryAsync, firstScore, firstScoreAsync, getScore, getScore, getScoreAsync, getScoreAsync, intersection, intersection, intersection, intersection, intersectionAsync, intersectionAsync, intersectionAsync, intersectionAsync, isEmpty, iterator, iterator, iterator, iterator, last, lastAsync, lastEntry, lastEntryAsync, lastScore, lastScoreAsync, mapReduce, pollFirst, pollFirst, pollFirst, pollFirst, pollFirstAsync, pollFirstAsync, pollFirstAsync, pollFirstAsync, pollFirstEntries, pollFirstEntries, pollFirstEntriesAsync, pollFirstEntriesAsync, pollFirstEntriesFromAny, pollFirstEntriesFromAny, pollFirstEntriesFromAnyAsync, pollFirstEntriesFromAnyAsync, pollFirstEntry, pollFirstEntryAsync, pollFirstFromAny, pollFirstFromAny, pollFirstFromAny, pollFirstFromAnyAsync, pollFirstFromAnyAsync, pollFirstFromAnyAsync, pollLast, pollLast, pollLast, pollLast, pollLastAsync, pollLastAsync, pollLastAsync, pollLastAsync, pollLastEntries, pollLastEntries, pollLastEntriesAsync, pollLastEntriesAsync, pollLastEntriesFromAny, pollLastEntriesFromAny, pollLastEntriesFromAnyAsync, pollLastEntriesFromAnyAsync, pollLastEntry, pollLastEntryAsync, pollLastFromAny, pollLastFromAny, pollLastFromAny, pollLastFromAnyAsync, pollLastFromAnyAsync, pollLastFromAnyAsync, random, random, randomAsync, randomAsync, randomEntries, randomEntriesAsync, rangeTo, rangeTo, rangeTo, rangeToAsync, rangeToAsync, rangeToAsync, rank, rankAsync, rankEntry, rankEntryAsync, readAll, readAllAsync, readDiff, readDiffAsync, readIntersection, readIntersection, readIntersection, readIntersection, readIntersectionAsync, readIntersectionAsync, readIntersectionAsync, readIntersectionAsync, readSort, readSort, readSort, readSort, readSort, readSort, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readUnion, readUnion, readUnion, readUnion, readUnionAsync, readUnionAsync, readUnionAsync, readUnionAsync, remove, removeAll, removeAllAsync, removeAsync, removeListener, removeListenerAsync, removeRangeByRank, removeRangeByRankAsync, removeRangeByScore, removeRangeByScoreAsync, replace, replaceAsync, retainAll, retainAllAsync, revRangeTo, revRangeTo, revRangeTo, revRangeToAsync, revRangeToAsync, revRangeToAsync, revRank, revRank, revRankAsync, revRankAsync, revRankEntry, revRankEntryAsync, scanIteratorAsync, size, sizeAsync, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, stream, stream, stream, stream, subscribeOnFirstElements, subscribeOnFirstElements, subscribeOnLastElements, subscribeOnLastElements, takeFirst, takeFirstAsync, takeLast, takeLastAsync, toArray, toArray, tryAdd, tryAddAsync, union, union, union, union, unionAsync, unionAsync, unionAsync, unionAsync, unsubscribe, value, valueRange, valueRange, valueRange, valueRangeAsync, valueRangeAsync, valueRangeAsync, valueRangeReversed, valueRangeReversed, valueRangeReversed, valueRangeReversedAsync, valueRangeReversedAsync, valueRangeReversedAsync
Methods inherited from class org.redisson.RedissonObject
addListener, addListener, addListenerAsync, addListenerAsync, addListenerId, addTrackingListener, addTrackingListenerAsync, checkNotBatch, copy, copy, copy, copyAndReplace, copyAndReplace, copyAndReplaceAsync, copyAndReplaceAsync, copyAsync, copyAsync, copyAsync, copyAsync, copyAsync, delete, deleteAsync, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getListenerIdsByName, getLockByMapKey, getLockByValue, getName, getNameByListenerId, getRawName, getRawName, getServiceManager, getSubscribeService, isExists, isExistsAsync, map, mapName, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListenerAsync, removeListenerAsync, removeListenerId, removeListeners, removeTrackingListener, removeTrackingListenerAsync, rename, renameAsync, renameAsync, renameAsync, renamenx, renamenxAsync, renamenxAsync, 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.util.Collection
parallelStream, removeIf, stream
Methods inherited from interface org.redisson.api.RCollectionAsync
containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsync
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.RLexSortedSet
addListener, pollFirst, pollLast, random, random, rank, revRank
Methods inherited from interface org.redisson.api.RLexSortedSetAsync
addListenerAsync, firstAsync, lastAsync, pollFirstAsync, pollLastAsync, randomAsync, randomAsync, rankAsync, readAllAsync, revRankAsync
Methods inherited from interface org.redisson.api.RObject
copy, copy, copy, copyAndReplace, copyAndReplace, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
Methods inherited from interface org.redisson.api.RObjectAsync
copyAndReplaceAsync, copyAndReplaceAsync, copyAsync, copyAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
Methods inherited from interface org.redisson.api.RSortedSet
distributedIterator, mapReduce, readAll, readAllAsync, removeAsync
Methods inherited from interface java.util.Set
clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
Methods inherited from interface java.util.SortedSet
first, last, spliterator
-
Constructor Details
-
RedissonLexSortedSet
public RedissonLexSortedSet(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
-
-
Method Details
-
removeRange
public int removeRange(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive) Description copied from interface:RLexSortedSet
Removes values range starting withfromElement
and ending withtoElement
.- Specified by:
removeRange
in interfaceRLexSortedSet
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- number of elements removed
-
removeRangeHead
Description copied from interface:RLexSortedSet
Removes head values range ending withtoElement
.- Specified by:
removeRangeHead
in interfaceRLexSortedSet
- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- number of elements removed
-
removeRangeHeadAsync
Description copied from interface:RLexSortedSetAsync
Removes head values range ending withtoElement
.- Specified by:
removeRangeHeadAsync
in interfaceRLexSortedSetAsync
- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- number of elements removed
-
removeRangeTail
Description copied from interface:RLexSortedSet
Removes tail values range starting withfromElement
.- Specified by:
removeRangeTail
in interfaceRLexSortedSet
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusive- Returns:
- number of elements removed
-
removeRangeTailAsync
Description copied from interface:RLexSortedSetAsync
Removes tail values range starting withfromElement
.- Specified by:
removeRangeTailAsync
in interfaceRLexSortedSetAsync
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusive- Returns:
- number of elements removed
-
removeRangeAsync
public RFuture<Integer> removeRangeAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive) Description copied from interface:RLexSortedSetAsync
Removes values range starting withfromElement
and ending withtoElement
.- Specified by:
removeRangeAsync
in interfaceRLexSortedSetAsync
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- number of elements removed
-
range
public Collection<String> range(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive) Description copied from interface:RLexSortedSet
Returns values range starting withfromElement
and ending withtoElement
.- Specified by:
range
in interfaceRLexSortedSet
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- collection of elements
-
rangeHead
Description copied from interface:RLexSortedSet
Returns head values range ending withtoElement
.- Specified by:
rangeHead
in interfaceRLexSortedSet
- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- collection of elements
-
rangeHeadAsync
Description copied from interface:RLexSortedSetAsync
Returns head values range ending withtoElement
.- Specified by:
rangeHeadAsync
in interfaceRLexSortedSetAsync
- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- collection of elements
-
rangeTail
Description copied from interface:RLexSortedSet
Returns tail values range starting withfromElement
.- Specified by:
rangeTail
in interfaceRLexSortedSet
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusive- Returns:
- collection of elements
-
rangeTailAsync
Description copied from interface:RLexSortedSetAsync
Returns tail values range starting withfromElement
.- Specified by:
rangeTailAsync
in interfaceRLexSortedSetAsync
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusive- Returns:
- collection of elements
-
rangeAsync
public RFuture<Collection<String>> rangeAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive) Description copied from interface:RLexSortedSetAsync
Returns values range starting withfromElement
and ending withtoElement
.- Specified by:
rangeAsync
in interfaceRLexSortedSetAsync
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- collection of elements
-
range
public Collection<String> range(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive, int offset, int count) Description copied from interface:RLexSortedSet
Returns values range starting withfromElement
and ending withtoElement
. Returned collection limited bycount
and starts withoffset
.- Specified by:
range
in interfaceRLexSortedSet
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
rangeHead
Description copied from interface:RLexSortedSet
Returns head values range ending withtoElement
. Returned collection limited bycount
and starts withoffset
.- Specified by:
rangeHead
in interfaceRLexSortedSet
- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
rangeHeadAsync
public RFuture<Collection<String>> rangeHeadAsync(String toElement, boolean toInclusive, int offset, int count) Description copied from interface:RLexSortedSetAsync
Returns head values range ending withtoElement
. Returned collection limited bycount
and starts withoffset
.- Specified by:
rangeHeadAsync
in interfaceRLexSortedSetAsync
- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
rangeTail
public Collection<String> rangeTail(String fromElement, boolean fromInclusive, int offset, int count) Description copied from interface:RLexSortedSet
Returns tail values range starting withfromElement
. Returned collection limited bycount
and starts withoffset
.- Specified by:
rangeTail
in interfaceRLexSortedSet
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
rangeTailAsync
public RFuture<Collection<String>> rangeTailAsync(String fromElement, boolean fromInclusive, int offset, int count) Description copied from interface:RLexSortedSetAsync
Returns tail values range starting withfromElement
. Returned collection limited bycount
and starts withoffset
.- Specified by:
rangeTailAsync
in interfaceRLexSortedSetAsync
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
rangeAsync
public RFuture<Collection<String>> rangeAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive, int offset, int count) Description copied from interface:RLexSortedSetAsync
Returns values range starting withfromElement
and ending withtoElement
. Returned collection limited bycount
and starts withoffset
.- Specified by:
rangeAsync
in interfaceRLexSortedSetAsync
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
rangeTailReversed
Description copied from interface:RLexSortedSet
Returns tail values range in reverse order starting withfromElement
.- Specified by:
rangeTailReversed
in interfaceRLexSortedSet
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusive- Returns:
- collection of elements
-
rangeHeadReversed
Description copied from interface:RLexSortedSet
Returns head values range in reverse order ending withtoElement
.- Specified by:
rangeHeadReversed
in interfaceRLexSortedSet
- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- collection of elements
-
rangeReversed
public Collection<String> rangeReversed(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive) Description copied from interface:RLexSortedSet
Returns values range in reverse order starting withfromElement
and ending withtoElement
.- Specified by:
rangeReversed
in interfaceRLexSortedSet
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- collection of elements
-
rangeTailReversed
public Collection<String> rangeTailReversed(String fromElement, boolean fromInclusive, int offset, int count) Description copied from interface:RLexSortedSet
Returns tail values range in reverse order starting withfromElement
. Returned collection limited bycount
and starts withoffset
.- Specified by:
rangeTailReversed
in interfaceRLexSortedSet
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
rangeHeadReversed
public Collection<String> rangeHeadReversed(String toElement, boolean toInclusive, int offset, int count) Description copied from interface:RLexSortedSet
Returns head values range in reverse order ending withtoElement
. Returned collection limited bycount
and starts withoffset
.- Specified by:
rangeHeadReversed
in interfaceRLexSortedSet
- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
rangeReversed
public Collection<String> rangeReversed(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive, int offset, int count) Description copied from interface:RLexSortedSet
Returns values range in reverse order starting withfromElement
and ending withtoElement
. Returned collection limited bycount
and starts withoffset
.- Specified by:
rangeReversed
in interfaceRLexSortedSet
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
rangeTailReversedAsync
public RFuture<Collection<String>> rangeTailReversedAsync(String fromElement, boolean fromInclusive) Description copied from interface:RLexSortedSetAsync
Returns tail values range in reverse order starting withfromElement
.- Specified by:
rangeTailReversedAsync
in interfaceRLexSortedSetAsync
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusive- Returns:
- collection of elements
-
rangeHeadReversedAsync
Description copied from interface:RLexSortedSetAsync
Returns head values range in reverse order ending withtoElement
.- Specified by:
rangeHeadReversedAsync
in interfaceRLexSortedSetAsync
- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- collection of elements
-
rangeReversedAsync
public RFuture<Collection<String>> rangeReversedAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive) Description copied from interface:RLexSortedSetAsync
Returns values range in reverse order starting withfromElement
and ending withtoElement
.- Specified by:
rangeReversedAsync
in interfaceRLexSortedSetAsync
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- collection of elements
-
rangeTailReversedAsync
public RFuture<Collection<String>> rangeTailReversedAsync(String fromElement, boolean fromInclusive, int offset, int count) Description copied from interface:RLexSortedSetAsync
Returns tail values range in reverse order starting withfromElement
. Returned collection limited bycount
and starts withoffset
.- Specified by:
rangeTailReversedAsync
in interfaceRLexSortedSetAsync
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
rangeHeadReversedAsync
public RFuture<Collection<String>> rangeHeadReversedAsync(String toElement, boolean toInclusive, int offset, int count) Description copied from interface:RLexSortedSetAsync
Returns head values range in reverse order ending withtoElement
. Returned collection limited bycount
and starts withoffset
.- Specified by:
rangeHeadReversedAsync
in interfaceRLexSortedSetAsync
- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
rangeReversedAsync
public RFuture<Collection<String>> rangeReversedAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive, int offset, int count) Description copied from interface:RLexSortedSetAsync
Returns values range in reverse order starting withfromElement
and ending withtoElement
. Returned collection limited bycount
and starts withoffset
.- Specified by:
rangeReversedAsync
in interfaceRLexSortedSetAsync
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
countTail
Description copied from interface:RLexSortedSet
Returns the number of tail values starting withfromElement
.- Specified by:
countTail
in interfaceRLexSortedSet
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusive- Returns:
- number of elements
-
countTailAsync
Description copied from interface:RLexSortedSetAsync
Returns the number of tail values starting withfromElement
.- Specified by:
countTailAsync
in interfaceRLexSortedSetAsync
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusive- Returns:
- number of elements
-
countHead
Description copied from interface:RLexSortedSet
Returns the number of head values ending withtoElement
.- Specified by:
countHead
in interfaceRLexSortedSet
- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- number of elements
-
countHeadAsync
Description copied from interface:RLexSortedSetAsync
Returns the number of head values ending withtoElement
.- Specified by:
countHeadAsync
in interfaceRLexSortedSetAsync
- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- number of elements
-
count
Description copied from interface:RLexSortedSet
Returns the number of elements betweenfromElement
andtoElement
.- Specified by:
count
in interfaceRLexSortedSet
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- number of elements
-
countAsync
public RFuture<Integer> countAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive) Description copied from interface:RLexSortedSetAsync
Returns the number of elements betweenfromElement
andtoElement
.- Specified by:
countAsync
in interfaceRLexSortedSetAsync
- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- number of elements
-
addAsync
Description copied from interface:RCollectionAsync
Adds element into this collection.- Specified by:
addAsync
in interfaceRCollectionAsync<String>
- Specified by:
addAsync
in interfaceRSortedSet<String>
- Parameters:
e
- - element to add- Returns:
true
if an element was added andfalse
if it is already present
-
addAllAsync
Description copied from interface:RCollectionAsync
Adds all elements contained in the specified collection- Specified by:
addAllAsync
in interfaceRCollectionAsync<String>
- Parameters:
c
- - collection of elements to add- Returns:
true
if at least one element was added andfalse
if all elements are already present
-
add
-
addAll
-
range
Description copied from interface:RLexSortedSet
Returns values by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Specified by:
range
in interfaceRLexSortedSet
- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- collection of elements
-
rangeAsync
Description copied from interface:RLexSortedSetAsync
Returns values by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Specified by:
rangeAsync
in interfaceRLexSortedSetAsync
- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- collection of elements
-
trySetComparator
Description copied from interface:RSortedSet
Sets new comparator only if current set is empty- Specified by:
trySetComparator
in interfaceRSortedSet<String>
- Parameters:
comparator
- for values- Returns:
true
if new comparator settedfalse
otherwise
-
distributedIterator
Description copied from interface:RSortedSet
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 list name.- Specified by:
distributedIterator
in interfaceRSortedSet<String>
- Parameters:
iteratorName
- redis object name to which cursor will be savedcount
- batch size- Returns:
- shared elements iterator
-
comparator
- Specified by:
comparator
in interfaceSortedSet<String>
-
subSet
-
headSet
-
tailSet
-
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
Returns remaining time of the object in milliseconds.- 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
Returns remaining time of the object in milliseconds.- 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
Returns expiration time of the object as the absolute Unix expiration timestamp in milliseconds.Requires Redis 7.0.0 and higher.
- Specified by:
getExpireTime
in interfaceRExpirable
- Returns:
- Unix time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expiration time.
-
getExpireTimeAsync
Description copied from interface:RExpirableAsync
Returns expiration time of the object as the absolute Unix expiration timestamp in milliseconds.Requires Redis 7.0.0 and higher.
- Specified by:
getExpireTimeAsync
in interfaceRExpirableAsync
- Returns:
- Unix time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expiration time.
-
expireAsync
-
expireAtAsync
-
clearExpireAsync
-