Package org.redisson
Class RedissonLexSortedSet
-
- org.redisson.RedissonObject
-
- >
-
- org.redisson.RedissonLexSortedSet
-
- All Implemented Interfaces:
<>
,<>
,<>
,<>
,>
,>
,>
,<>>
,<>>
,>
public class RedissonLexSortedSet extends > 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, name, RedissonClient redisson)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
e)
boolean
<? extends > c)
>
<? extends > c)
Adds all elements contained in the specified collection>
e)
Adds element into this collection.boolean
clearExpire()
Clear an expire timeout or expire date for object.>
clearExpireAsync()
Clear an expire timeout or expire date for object in async mode.protected >
... keys)
<? super >
comparator()
int
fromElement, boolean fromInclusive, toElement, boolean toInclusive)
Returns the number of elements betweenfromElement
andtoElement
.>
fromElement, boolean fromInclusive, toElement, boolean toInclusive)
Returns the number of elements betweenfromElement
andtoElement
.int
toElement, boolean toInclusive)
Returns the number of head values ending withtoElement
.>
toElement, boolean toInclusive)
Returns the number of head values ending withtoElement
.int
fromElement, boolean fromInclusive)
Returns the number of tail values starting withfromElement
.>
fromElement, boolean fromInclusive)
Returns the number of tail values starting withfromElement
.boolean
expire(long timeToLive, timeUnit)
Set a timeout for object.boolean
instant)
Set an expire date for object.>
expireAsync(long timeToLive, timeUnit)
Set a timeout for object in async mode.protected >
expireAsync(long timeToLive, timeUnit, ... keys)
>
instant)
Set an expire date for object.boolean
expireAt(long timestamp)
UseRExpirable.expire(Instant)
insteadboolean
timestamp)
UseRExpirable.expire(Instant)
instead>
expireAtAsync(long timestamp)
UseRExpirableAsync.expireAsync(Instant)
insteadprotected >
expireAtAsync(long timestamp, ... keys)
>
timestamp)
UseRExpirableAsync.expireAsync(Instant)
instead<>
toElement)
<>
range(int startIndex, int endIndex)
Returns values by rank range.<>
fromElement, boolean fromInclusive, toElement, boolean toInclusive)
Returns values range starting withfromElement
and ending withtoElement
.<>
fromElement, boolean fromInclusive, 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.<>>
fromElement, boolean fromInclusive, toElement, boolean toInclusive)
Returns values range starting withfromElement
and ending withtoElement
.<>>
fromElement, boolean fromInclusive, toElement, boolean toInclusive, int offset, int count)
Returns values range starting withfromElement
and ending withtoElement
.<>
toElement, boolean toInclusive)
Returns head values range ending withtoElement
.<>
toElement, boolean toInclusive, int offset, int count)
Returns head values range ending withtoElement
.<>>
toElement, boolean toInclusive)
Returns head values range ending withtoElement
.<>>
toElement, boolean toInclusive, int offset, int count)
Returns head values range ending withtoElement
.<>
toElement, boolean toInclusive)
Returns head values range in reverse order ending withtoElement
.<>
toElement, boolean toInclusive, int offset, int count)
Returns head values range in reverse order ending withtoElement
.<>>
toElement, boolean toInclusive)
Returns head values range in reverse order ending withtoElement
.<>>
toElement, boolean toInclusive, int offset, int count)
Returns head values range in reverse order ending withtoElement
.<>
fromElement, boolean fromInclusive, toElement, boolean toInclusive)
Returns values range in reverse order starting withfromElement
and ending withtoElement
.<>
fromElement, boolean fromInclusive, toElement, boolean toInclusive, int offset, int count)
Returns values range in reverse order starting withfromElement
and ending withtoElement
.<>>
fromElement, boolean fromInclusive, toElement, boolean toInclusive)
Returns values range in reverse order starting withfromElement
and ending withtoElement
.<>>
fromElement, boolean fromInclusive, toElement, boolean toInclusive, int offset, int count)
Returns values range in reverse order starting withfromElement
and ending withtoElement
.<>
fromElement, boolean fromInclusive)
Returns tail values range starting withfromElement
.<>
fromElement, boolean fromInclusive, int offset, int count)
Returns tail values range starting withfromElement
.<>>
fromElement, boolean fromInclusive)
Returns tail values range starting withfromElement
.<>>
fromElement, boolean fromInclusive, int offset, int count)
Returns tail values range starting withfromElement
.<>
fromElement, boolean fromInclusive)
Returns tail values range in reverse order starting withfromElement
.<>
fromElement, boolean fromInclusive, int offset, int count)
Returns tail values range in reverse order starting withfromElement
.<>>
fromElement, boolean fromInclusive)
Returns tail values range in reverse order starting withfromElement
.<>>
fromElement, boolean fromInclusive, int offset, int count)
Returns tail values range in reverse order starting withfromElement
.long
remainTimeToLive()
Remaining time to live of Redisson object that has a timeout>
remainTimeToLiveAsync()
Remaining time to live of Redisson object that has a timeoutint
fromElement, boolean fromInclusive, toElement, boolean toInclusive)
Removes values range starting withfromElement
and ending withtoElement
.>
fromElement, boolean fromInclusive, toElement, boolean toInclusive)
Removes values range starting withfromElement
and ending withtoElement
.int
toElement, boolean toInclusive)
Removes head values range ending withtoElement
.>
toElement, boolean toInclusive)
Removes head values range ending withtoElement
.int
fromElement, boolean fromInclusive)
Removes tail values range starting withfromElement
.>
fromElement, boolean fromInclusive)
Removes tail values range starting withfromElement
.<>
fromElement, toElement)
<>
fromElement)
boolean
<? super > 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 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
-
-
-
-
Constructor Detail
-
RedissonLexSortedSet
public RedissonLexSortedSet(CommandAsyncExecutor commandExecutor, name, RedissonClient redisson)
-
-
Method Detail
-
removeRange
public int removeRange( fromElement, boolean fromInclusive, 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
public int removeRangeHead( toElement, boolean toInclusive)
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
public > removeRangeHeadAsync( toElement, boolean toInclusive)
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
public int removeRangeTail( fromElement, boolean fromInclusive)
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
public > removeRangeTailAsync( fromElement, boolean fromInclusive)
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 > removeRangeAsync( fromElement, boolean fromInclusive, 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 <> range( fromElement, boolean fromInclusive, 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
public <> rangeHead( toElement, boolean toInclusive)
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
public <>> rangeHeadAsync( toElement, boolean toInclusive)
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
public <> rangeTail( fromElement, boolean fromInclusive)
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
public <>> rangeTailAsync( fromElement, boolean fromInclusive)
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 <>> rangeAsync( fromElement, boolean fromInclusive, 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 <> range( fromElement, boolean fromInclusive, 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
public <> rangeHead( toElement, boolean toInclusive, int offset, int count)
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 <>> rangeHeadAsync( 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 <> rangeTail( 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 <>> rangeTailAsync( 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 <>> rangeAsync( fromElement, boolean fromInclusive, 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
public <> rangeTailReversed( fromElement, boolean fromInclusive)
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
public <> rangeHeadReversed( toElement, boolean toInclusive)
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 <> rangeReversed( fromElement, boolean fromInclusive, 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 <> rangeTailReversed( 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 <> rangeHeadReversed( 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 <> rangeReversed( fromElement, boolean fromInclusive, 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 <>> rangeTailReversedAsync( 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
public <>> rangeHeadReversedAsync( toElement, boolean toInclusive)
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 <>> rangeReversedAsync( fromElement, boolean fromInclusive, 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 <>> rangeTailReversedAsync( 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 <>> rangeHeadReversedAsync( 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 <>> rangeReversedAsync( fromElement, boolean fromInclusive, 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
public int countTail( fromElement, boolean fromInclusive)
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
public > countTailAsync( fromElement, boolean fromInclusive)
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
public int countHead( toElement, boolean toInclusive)
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
public > countHeadAsync( toElement, boolean toInclusive)
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
public int count( fromElement, boolean fromInclusive, toElement, boolean toInclusive)
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 > countAsync( fromElement, boolean fromInclusive, 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
public > addAsync( e)
Description copied from interface:RCollectionAsync
Adds element into this collection.- Specified by:
>
- Specified by:
>
- Parameters:
e
- - element to add- Returns:
true
if an element was added andfalse
if it is already present
-
addAllAsync
public > addAllAsync(<? extends > c)
Description copied from interface:RCollectionAsync
Adds all elements contained in the specified collection- Specified by:
>
- Parameters:
c
- - collection of elements to add- Returns:
true
if at least one element was added andfalse
if all elements are already present
-
add
public boolean add( e)
- Specified by:
in interface
<>
- Specified by:
in interface
<>
-
addAll
public boolean addAll(<? extends > c)
- Specified by:
in interface
<>
- Specified by:
in interface
<>
-
range
public <> range(int startIndex, int endIndex)
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
public <>> rangeAsync(int startIndex, int endIndex)
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
public boolean trySetComparator(<? super > comparator)
Description copied from interface:RSortedSet
Sets new comparator only if current set is empty- Specified by:
>
- Parameters:
comparator
- for values- Returns:
true
if new comparator settedfalse
otherwise
-
comparator
public <? super > comparator()
- Specified by:
in interface
<>
-
subSet
public <> subSet( fromElement, toElement)
- Specified by:
in interface
<>
-
headSet
public <> headSet( toElement)
- Specified by:
in interface
<>
-
tailSet
public <> tailSet( fromElement)
- Specified by:
in interface
<>
-
expire
public boolean expire(long timeToLive, timeUnit)
Description copied from interface:RExpirable
Set a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expire
in interfaceRExpirable
- Parameters:
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unit- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
public > expireAsync(long timeToLive, timeUnit)
Description copied from interface:RExpirableAsync
Set a timeout for object in async mode. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unit- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
public boolean expireAt(long timestamp)
Description copied from interface:RExpirable
UseRExpirable.expire(Instant)
instead- Specified by:
expireAt
in interfaceRExpirable
- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
expireAtAsync
public > expireAtAsync(long timestamp)
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Instant)
instead- Specified by:
expireAtAsync
in interfaceRExpirableAsync
- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
expire
public boolean expire( instant)
Description copied from interface:RExpirable
Set an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expire
in interfaceRExpirable
- Parameters:
instant
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
public > expireAsync( instant)
Description copied from interface:RExpirableAsync
Set an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
instant
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
public boolean expireAt( timestamp)
Description copied from interface:RExpirable
UseRExpirable.expire(Instant)
instead- Specified by:
expireAt
in interfaceRExpirable
- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAtAsync
public > expireAtAsync( timestamp)
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Instant)
instead- Specified by:
expireAtAsync
in interfaceRExpirableAsync
- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
clearExpire
public boolean clearExpire()
Description copied from interface:RExpirable
Clear an expire timeout or expire date for object.- Specified by:
clearExpire
in interfaceRExpirable
- Returns:
true
if timeout was removedfalse
if object does not exist or does not have an associated timeout
-
clearExpireAsync
public > clearExpireAsync()
Description copied from interface:RExpirableAsync
Clear an expire timeout or expire date for object in async mode. Object will not be deleted.- Specified by:
clearExpireAsync
in interfaceRExpirableAsync
- Returns:
true
if the timeout was cleared andfalse
if not
-
remainTimeToLive
public long remainTimeToLive()
Description copied from interface:RExpirable
Remaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLive
in interfaceRExpirable
- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
remainTimeToLiveAsync
public > remainTimeToLiveAsync()
Description copied from interface:RExpirableAsync
Remaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLiveAsync
in interfaceRExpirableAsync
- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
expireAsync
protected > expireAsync(long timeToLive, timeUnit, ... keys)
-
expireAtAsync
protected > expireAtAsync(long timestamp, ... keys)
-
clearExpireAsync
protected > clearExpireAsync(... keys)
-
-