Package org.redisson
Class RedissonLexSortedSet
- java.lang.Object
-
- org.redisson.RedissonObject
-
- org.redisson.RedissonScoredSortedSet<String>
-
- org.redisson.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>
public class RedissonLexSortedSet extends RedissonScoredSortedSet<String> implements RLexSortedSet
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
Constructors Constructor Description RedissonLexSortedSet(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(String e)booleanaddAll(Collection<? extends String> c)RFuture<Boolean>addAllAsync(Collection<? extends String> c)Adds all elements contained in the specified collectionRFuture<Boolean>addAsync(String e)Adds element into this collection.booleanclearExpire()Clear an expire timeout or expire date for object.RFuture<Boolean>clearExpireAsync()Clear an expire timeout or expire date for object in async mode.protected RFuture<Boolean>clearExpireAsync(String... keys)Comparator<? super String>comparator()intcount(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive)Returns the number of elements betweenfromElementandtoElement.RFuture<Integer>countAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive)Returns the number of elements betweenfromElementandtoElement.intcountHead(String toElement, boolean toInclusive)Returns the number of head values ending withtoElement.RFuture<Integer>countHeadAsync(String toElement, boolean toInclusive)Returns the number of head values ending withtoElement.intcountTail(String fromElement, boolean fromInclusive)Returns the number of tail values starting withfromElement.RFuture<Integer>countTailAsync(String fromElement, boolean fromInclusive)Returns the number of tail values starting withfromElement.booleanexpire(long timeToLive, TimeUnit timeUnit)Set a timeout for object.booleanexpire(Instant instant)Set an expire date for object.RFuture<Boolean>expireAsync(long timeToLive, TimeUnit timeUnit)Set a timeout for object in async mode.protected RFuture<Boolean>expireAsync(long timeToLive, TimeUnit timeUnit, String... keys)RFuture<Boolean>expireAsync(Instant instant)Set an expire date for object.booleanexpireAt(long timestamp)UseRExpirable.expire(Instant)insteadbooleanexpireAt(Date timestamp)UseRExpirable.expire(Instant)insteadRFuture<Boolean>expireAtAsync(long timestamp)UseRExpirableAsync.expireAsync(Instant)insteadprotected RFuture<Boolean>expireAtAsync(long timestamp, String... keys)RFuture<Boolean>expireAtAsync(Date timestamp)UseRExpirableAsync.expireAsync(Instant)insteadSortedSet<String>headSet(String toElement)Collection<String>range(int startIndex, int endIndex)Returns values by rank range.Collection<String>range(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive)Returns values range starting withfromElementand ending withtoElement.Collection<String>range(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive, int offset, int count)Returns values range starting withfromElementand ending withtoElement.RFuture<Collection<String>>rangeAsync(int startIndex, int endIndex)Returns values by rank range.RFuture<Collection<String>>rangeAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive)Returns values range starting withfromElementand ending withtoElement.RFuture<Collection<String>>rangeAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive, int offset, int count)Returns values range starting withfromElementand ending withtoElement.Collection<String>rangeHead(String toElement, boolean toInclusive)Returns head values range ending withtoElement.Collection<String>rangeHead(String toElement, boolean toInclusive, int offset, int count)Returns head values range ending withtoElement.RFuture<Collection<String>>rangeHeadAsync(String toElement, boolean toInclusive)Returns head values range ending withtoElement.RFuture<Collection<String>>rangeHeadAsync(String toElement, boolean toInclusive, int offset, int count)Returns head values range ending withtoElement.Collection<String>rangeHeadReversed(String toElement, boolean toInclusive)Returns head values range in reverse order ending withtoElement.Collection<String>rangeHeadReversed(String toElement, boolean toInclusive, int offset, int count)Returns head values range in reverse order ending withtoElement.RFuture<Collection<String>>rangeHeadReversedAsync(String toElement, boolean toInclusive)Returns head values range in reverse order ending withtoElement.RFuture<Collection<String>>rangeHeadReversedAsync(String toElement, boolean toInclusive, int offset, int count)Returns head values range in reverse order ending withtoElement.Collection<String>rangeReversed(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive)Returns values range in reverse order starting withfromElementand ending withtoElement.Collection<String>rangeReversed(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive, int offset, int count)Returns values range in reverse order starting withfromElementand ending withtoElement.RFuture<Collection<String>>rangeReversedAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive)Returns values range in reverse order starting withfromElementand ending withtoElement.RFuture<Collection<String>>rangeReversedAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive, int offset, int count)Returns values range in reverse order starting withfromElementand ending withtoElement.Collection<String>rangeTail(String fromElement, boolean fromInclusive)Returns tail values range starting withfromElement.Collection<String>rangeTail(String fromElement, boolean fromInclusive, int offset, int count)Returns tail values range starting withfromElement.RFuture<Collection<String>>rangeTailAsync(String fromElement, boolean fromInclusive)Returns tail values range starting withfromElement.RFuture<Collection<String>>rangeTailAsync(String fromElement, boolean fromInclusive, int offset, int count)Returns tail values range starting withfromElement.Collection<String>rangeTailReversed(String fromElement, boolean fromInclusive)Returns tail values range in reverse order starting withfromElement.Collection<String>rangeTailReversed(String fromElement, boolean fromInclusive, int offset, int count)Returns tail values range in reverse order starting withfromElement.RFuture<Collection<String>>rangeTailReversedAsync(String fromElement, boolean fromInclusive)Returns tail values range in reverse order starting withfromElement.RFuture<Collection<String>>rangeTailReversedAsync(String fromElement, boolean fromInclusive, int offset, int count)Returns tail values range in reverse order starting withfromElement.longremainTimeToLive()Remaining time to live of Redisson object that has a timeoutRFuture<Long>remainTimeToLiveAsync()Remaining time to live of Redisson object that has a timeoutintremoveRange(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive)Removes values range starting withfromElementand ending withtoElement.RFuture<Integer>removeRangeAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive)Removes values range starting withfromElementand ending withtoElement.intremoveRangeHead(String toElement, boolean toInclusive)Removes head values range ending withtoElement.RFuture<Integer>removeRangeHeadAsync(String toElement, boolean toInclusive)Removes head values range ending withtoElement.intremoveRangeTail(String fromElement, boolean fromInclusive)Removes tail values range starting withfromElement.RFuture<Integer>removeRangeTailAsync(String fromElement, boolean fromInclusive)Removes tail values range starting withfromElement.SortedSet<String>subSet(String fromElement, String toElement)SortedSet<String>tailSet(String fromElement)booleantrySetComparator(Comparator<? super String> comparator)Sets new comparator only if current set is empty-
Methods inherited from class org.redisson.RedissonScoredSortedSet
add, addAll, addAllAsync, addAndGetRank, addAndGetRankAsync, addAndGetRevRank, addAndGetRevRank, addAndGetRevRankAsync, addAndGetRevRankAsync, addAsync, addIfExists, addIfExistsAsync, addIfGreater, addIfGreaterAsync, addIfLess, addIfLessAsync, addListener, addListenerAsync, addScore, addScoreAndGetRank, addScoreAndGetRankAsync, addScoreAndGetRevRank, addScoreAndGetRevRankAsync, addScoreAsync, clear, contains, containsAll, containsAllAsync, containsAsync, count, countAsync, diff, diffAsync, entryRange, entryRange, entryRange, entryRangeAsync, entryRangeAsync, entryRangeAsync, entryRangeReversed, entryRangeReversed, entryRangeReversed, entryRangeReversedAsync, entryRangeReversedAsync, entryRangeReversedAsync, first, firstAsync, firstScore, firstScoreAsync, getScore, getScore, getScoreAsync, getScoreAsync, intersection, intersection, intersection, intersection, intersectionAsync, intersectionAsync, intersectionAsync, intersectionAsync, isEmpty, iterator, iterator, iterator, iterator, last, lastAsync, lastScore, lastScoreAsync, mapReduce, pollFirst, pollFirst, pollFirst, pollFirstAsync, pollFirstAsync, pollFirstAsync, pollFirstFromAny, pollFirstFromAnyAsync, pollLast, pollLast, pollLast, pollLastAsync, pollLastAsync, pollLastAsync, pollLastFromAny, pollLastFromAnyAsync, random, random, randomAsync, randomAsync, randomEntries, randomEntriesAsync, rangeTo, rangeTo, rangeTo, rangeToAsync, rangeToAsync, rangeToAsync, rank, rankAsync, 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, retainAll, retainAllAsync, revRangeTo, revRangeTo, revRangeTo, revRangeToAsync, revRangeToAsync, revRangeToAsync, revRank, revRank, revRankAsync, revRankAsync, scanIteratorAsync, size, sizeAsync, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, stream, stream, stream, stream, subscribeOnFirstElements, subscribeOnLastElements, takeFirst, takeFirstAsync, takeLast, takeLastAsync, toArray, toArray, tryAdd, tryAddAsync, union, union, union, union, unionAsync, unionAsync, unionAsync, unionAsync, unsubscribe, valueRange, valueRange, valueRange, valueRangeAsync, valueRangeAsync, valueRangeAsync, valueRangeReversed, valueRangeReversed, valueRangeReversed, valueRangeReversedAsync, valueRangeReversedAsync, valueRangeReversedAsync
-
Methods inherited from class org.redisson.RedissonObject
addListener, addListenerAsync, copy, copyAsync, delete, deleteAsync, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsync
-
Methods inherited from 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, toArray
-
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, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RLexSortedSet
pollFirst, pollLast, rank, revRank
-
Methods inherited from interface org.redisson.api.RLexSortedSetAsync
firstAsync, lastAsync, pollFirstAsync, pollLastAsync, rankAsync, readAllAsync, revRankAsync
-
Methods inherited from interface org.redisson.api.RObject
addListener, copy, 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
addListenerAsync, 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
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 Detail
-
RedissonLexSortedSet
public RedissonLexSortedSet(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
-
-
Method Detail
-
removeRange
public int removeRange(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive)
Description copied from interface:RLexSortedSetRemoves values range starting withfromElementand ending withtoElement.- Specified by:
removeRangein interfaceRLexSortedSet- Parameters:
fromElement- - start elementfromInclusive- - start element inclusivetoElement- - end elementtoInclusive- - end element inclusive- Returns:
- number of elements removed
-
removeRangeHead
public int removeRangeHead(String toElement, boolean toInclusive)
Description copied from interface:RLexSortedSetRemoves head values range ending withtoElement.- Specified by:
removeRangeHeadin interfaceRLexSortedSet- Parameters:
toElement- - end elementtoInclusive- - end element inclusive- Returns:
- number of elements removed
-
removeRangeHeadAsync
public RFuture<Integer> removeRangeHeadAsync(String toElement, boolean toInclusive)
Description copied from interface:RLexSortedSetAsyncRemoves head values range ending withtoElement.- Specified by:
removeRangeHeadAsyncin interfaceRLexSortedSetAsync- Parameters:
toElement- - end elementtoInclusive- - end element inclusive- Returns:
- number of elements removed
-
removeRangeTail
public int removeRangeTail(String fromElement, boolean fromInclusive)
Description copied from interface:RLexSortedSetRemoves tail values range starting withfromElement.- Specified by:
removeRangeTailin interfaceRLexSortedSet- Parameters:
fromElement- - start elementfromInclusive- - start element inclusive- Returns:
- number of elements removed
-
removeRangeTailAsync
public RFuture<Integer> removeRangeTailAsync(String fromElement, boolean fromInclusive)
Description copied from interface:RLexSortedSetAsyncRemoves tail values range starting withfromElement.- Specified by:
removeRangeTailAsyncin 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:RLexSortedSetAsyncRemoves values range starting withfromElementand ending withtoElement.- Specified by:
removeRangeAsyncin 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:RLexSortedSetReturns values range starting withfromElementand ending withtoElement.- Specified by:
rangein interfaceRLexSortedSet- Parameters:
fromElement- - start elementfromInclusive- - start element inclusivetoElement- - end elementtoInclusive- - end element inclusive- Returns:
- collection of elements
-
rangeHead
public Collection<String> rangeHead(String toElement, boolean toInclusive)
Description copied from interface:RLexSortedSetReturns head values range ending withtoElement.- Specified by:
rangeHeadin interfaceRLexSortedSet- Parameters:
toElement- - end elementtoInclusive- - end element inclusive- Returns:
- collection of elements
-
rangeHeadAsync
public RFuture<Collection<String>> rangeHeadAsync(String toElement, boolean toInclusive)
Description copied from interface:RLexSortedSetAsyncReturns head values range ending withtoElement.- Specified by:
rangeHeadAsyncin interfaceRLexSortedSetAsync- Parameters:
toElement- - end elementtoInclusive- - end element inclusive- Returns:
- collection of elements
-
rangeTail
public Collection<String> rangeTail(String fromElement, boolean fromInclusive)
Description copied from interface:RLexSortedSetReturns tail values range starting withfromElement.- Specified by:
rangeTailin interfaceRLexSortedSet- Parameters:
fromElement- - start elementfromInclusive- - start element inclusive- Returns:
- collection of elements
-
rangeTailAsync
public RFuture<Collection<String>> rangeTailAsync(String fromElement, boolean fromInclusive)
Description copied from interface:RLexSortedSetAsyncReturns tail values range starting withfromElement.- Specified by:
rangeTailAsyncin 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:RLexSortedSetAsyncReturns values range starting withfromElementand ending withtoElement.- Specified by:
rangeAsyncin 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:RLexSortedSetReturns values range starting withfromElementand ending withtoElement. Returned collection limited bycountand starts withoffset.- Specified by:
rangein 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
public Collection<String> rangeHead(String toElement, boolean toInclusive, int offset, int count)
Description copied from interface:RLexSortedSetReturns head values range ending withtoElement. Returned collection limited bycountand starts withoffset.- Specified by:
rangeHeadin 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:RLexSortedSetAsyncReturns head values range ending withtoElement. Returned collection limited bycountand starts withoffset.- Specified by:
rangeHeadAsyncin 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:RLexSortedSetReturns tail values range starting withfromElement. Returned collection limited bycountand starts withoffset.- Specified by:
rangeTailin 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:RLexSortedSetAsyncReturns tail values range starting withfromElement. Returned collection limited bycountand starts withoffset.- Specified by:
rangeTailAsyncin 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:RLexSortedSetAsyncReturns values range starting withfromElementand ending withtoElement. Returned collection limited bycountand starts withoffset.- Specified by:
rangeAsyncin 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
public Collection<String> rangeTailReversed(String fromElement, boolean fromInclusive)
Description copied from interface:RLexSortedSetReturns tail values range in reverse order starting withfromElement.- Specified by:
rangeTailReversedin interfaceRLexSortedSet- Parameters:
fromElement- - start elementfromInclusive- - start element inclusive- Returns:
- collection of elements
-
rangeHeadReversed
public Collection<String> rangeHeadReversed(String toElement, boolean toInclusive)
Description copied from interface:RLexSortedSetReturns head values range in reverse order ending withtoElement.- Specified by:
rangeHeadReversedin 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:RLexSortedSetReturns values range in reverse order starting withfromElementand ending withtoElement.- Specified by:
rangeReversedin 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:RLexSortedSetReturns tail values range in reverse order starting withfromElement. Returned collection limited bycountand starts withoffset.- Specified by:
rangeTailReversedin 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:RLexSortedSetReturns head values range in reverse order ending withtoElement. Returned collection limited bycountand starts withoffset.- Specified by:
rangeHeadReversedin 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:RLexSortedSetReturns values range in reverse order starting withfromElementand ending withtoElement. Returned collection limited bycountand starts withoffset.- Specified by:
rangeReversedin 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:RLexSortedSetAsyncReturns tail values range in reverse order starting withfromElement.- Specified by:
rangeTailReversedAsyncin interfaceRLexSortedSetAsync- Parameters:
fromElement- - start elementfromInclusive- - start element inclusive- Returns:
- collection of elements
-
rangeHeadReversedAsync
public RFuture<Collection<String>> rangeHeadReversedAsync(String toElement, boolean toInclusive)
Description copied from interface:RLexSortedSetAsyncReturns head values range in reverse order ending withtoElement.- Specified by:
rangeHeadReversedAsyncin 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:RLexSortedSetAsyncReturns values range in reverse order starting withfromElementand ending withtoElement.- Specified by:
rangeReversedAsyncin 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:RLexSortedSetAsyncReturns tail values range in reverse order starting withfromElement. Returned collection limited bycountand starts withoffset.- Specified by:
rangeTailReversedAsyncin 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:RLexSortedSetAsyncReturns head values range in reverse order ending withtoElement. Returned collection limited bycountand starts withoffset.- Specified by:
rangeHeadReversedAsyncin 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:RLexSortedSetAsyncReturns values range in reverse order starting withfromElementand ending withtoElement. Returned collection limited bycountand starts withoffset.- Specified by:
rangeReversedAsyncin 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
public int countTail(String fromElement, boolean fromInclusive)
Description copied from interface:RLexSortedSetReturns the number of tail values starting withfromElement.- Specified by:
countTailin interfaceRLexSortedSet- Parameters:
fromElement- - start elementfromInclusive- - start element inclusive- Returns:
- number of elements
-
countTailAsync
public RFuture<Integer> countTailAsync(String fromElement, boolean fromInclusive)
Description copied from interface:RLexSortedSetAsyncReturns the number of tail values starting withfromElement.- Specified by:
countTailAsyncin interfaceRLexSortedSetAsync- Parameters:
fromElement- - start elementfromInclusive- - start element inclusive- Returns:
- number of elements
-
countHead
public int countHead(String toElement, boolean toInclusive)
Description copied from interface:RLexSortedSetReturns the number of head values ending withtoElement.- Specified by:
countHeadin interfaceRLexSortedSet- Parameters:
toElement- - end elementtoInclusive- - end element inclusive- Returns:
- number of elements
-
countHeadAsync
public RFuture<Integer> countHeadAsync(String toElement, boolean toInclusive)
Description copied from interface:RLexSortedSetAsyncReturns the number of head values ending withtoElement.- Specified by:
countHeadAsyncin interfaceRLexSortedSetAsync- Parameters:
toElement- - end elementtoInclusive- - end element inclusive- Returns:
- number of elements
-
count
public int count(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive)
Description copied from interface:RLexSortedSetReturns the number of elements betweenfromElementandtoElement.- Specified by:
countin 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:RLexSortedSetAsyncReturns the number of elements betweenfromElementandtoElement.- Specified by:
countAsyncin interfaceRLexSortedSetAsync- Parameters:
fromElement- - start elementfromInclusive- - start element inclusivetoElement- - end elementtoInclusive- - end element inclusive- Returns:
- number of elements
-
addAsync
public RFuture<Boolean> addAsync(String e)
Description copied from interface:RCollectionAsyncAdds element into this collection.- Specified by:
addAsyncin interfaceRCollectionAsync<String>- Specified by:
addAsyncin interfaceRSortedSet<String>- Parameters:
e- - element to add- Returns:
trueif an element was added andfalseif it is already present
-
addAllAsync
public RFuture<Boolean> addAllAsync(Collection<? extends String> c)
Description copied from interface:RCollectionAsyncAdds all elements contained in the specified collection- Specified by:
addAllAsyncin interfaceRCollectionAsync<String>- Parameters:
c- - collection of elements to add- Returns:
trueif at least one element was added andfalseif all elements are already present
-
add
public boolean add(String e)
-
addAll
public boolean addAll(Collection<? extends String> c)
-
range
public Collection<String> range(int startIndex, int endIndex)
Description copied from interface:RLexSortedSetReturns values by rank range. Indexes are zero based.-1means the highest score,-2means the second highest score.- Specified by:
rangein interfaceRLexSortedSet- Parameters:
startIndex- - start indexendIndex- - end index- Returns:
- collection of elements
-
rangeAsync
public RFuture<Collection<String>> rangeAsync(int startIndex, int endIndex)
Description copied from interface:RLexSortedSetAsyncReturns values by rank range. Indexes are zero based.-1means the highest score,-2means the second highest score.- Specified by:
rangeAsyncin interfaceRLexSortedSetAsync- Parameters:
startIndex- - start indexendIndex- - end index- Returns:
- collection of elements
-
trySetComparator
public boolean trySetComparator(Comparator<? super String> comparator)
Description copied from interface:RSortedSetSets new comparator only if current set is empty- Specified by:
trySetComparatorin interfaceRSortedSet<String>- Parameters:
comparator- for values- Returns:
trueif new comparator settedfalseotherwise
-
comparator
public Comparator<? super String> comparator()
- Specified by:
comparatorin interfaceSortedSet<String>
-
expire
public boolean expire(long timeToLive, TimeUnit timeUnit)Description copied from interface:RExpirableSet a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expirein interfaceRExpirable- Parameters:
timeToLive- - timeout before object will be deletedtimeUnit- - timeout time unit- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
public RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
Description copied from interface:RExpirableAsyncSet a timeout for object in async mode. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsyncin interfaceRExpirableAsync- Parameters:
timeToLive- - timeout before object will be deletedtimeUnit- - timeout time unit- Returns:
trueif the timeout was set andfalseif not
-
expireAt
public boolean expireAt(long timestamp)
Description copied from interface:RExpirableUseRExpirable.expire(Instant)instead- Specified by:
expireAtin interfaceRExpirable- Parameters:
timestamp- - expire date in milliseconds (Unix timestamp)- Returns:
trueif the timeout was set andfalseif not
-
expireAtAsync
public RFuture<Boolean> expireAtAsync(long timestamp)
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Instant)instead- Specified by:
expireAtAsyncin interfaceRExpirableAsync- Parameters:
timestamp- - expire date in milliseconds (Unix timestamp)- Returns:
trueif the timeout was set andfalseif not
-
expire
public boolean expire(Instant instant)
Description copied from interface:RExpirableSet an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expirein interfaceRExpirable- Parameters:
instant- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
public RFuture<Boolean> expireAsync(Instant instant)
Description copied from interface:RExpirableAsyncSet an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expireAsyncin interfaceRExpirableAsync- Parameters:
instant- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAt
public boolean expireAt(Date timestamp)
Description copied from interface:RExpirableUseRExpirable.expire(Instant)instead- Specified by:
expireAtin interfaceRExpirable- Parameters:
timestamp- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAtAsync
public RFuture<Boolean> expireAtAsync(Date timestamp)
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Instant)instead- Specified by:
expireAtAsyncin interfaceRExpirableAsync- Parameters:
timestamp- - expire date- Returns:
trueif the timeout was set andfalseif not
-
clearExpire
public boolean clearExpire()
Description copied from interface:RExpirableClear an expire timeout or expire date for object.- Specified by:
clearExpirein interfaceRExpirable- Returns:
trueif timeout was removedfalseif object does not exist or does not have an associated timeout
-
clearExpireAsync
public RFuture<Boolean> clearExpireAsync()
Description copied from interface:RExpirableAsyncClear an expire timeout or expire date for object in async mode. Object will not be deleted.- Specified by:
clearExpireAsyncin interfaceRExpirableAsync- Returns:
trueif the timeout was cleared andfalseif not
-
remainTimeToLive
public long remainTimeToLive()
Description copied from interface:RExpirableRemaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLivein interfaceRExpirable- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
remainTimeToLiveAsync
public RFuture<Long> remainTimeToLiveAsync()
Description copied from interface:RExpirableAsyncRemaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLiveAsyncin interfaceRExpirableAsync- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
expireAsync
protected RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit, String... keys)
-
-