Package org.redisson.api
Interface RLexSortedSet
-
- All Superinterfaces:
<>
,<>
,>
,>
,<>
,<>
- All Known Implementing Classes:
RedissonLexSortedSet
public interface RLexSortedSet extends >, RExpirable
Sorted set contained values of String type- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
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
.int
fromElement, boolean fromInclusive)
Returns the number of tail values starting withfromElement
.pollFirst()
Removes and returns the head element ornull
if this sorted set is empty.pollLast()
Removes and returns the tail element ornull
if this sorted set is empty.<>
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
.<>
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
.<>
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 in reverse order starting withfromElement
.<>
fromElement, boolean fromInclusive, int offset, int count)
Returns tail values range in reverse order starting withfromElement
.o)
Returns rank of the elementint
fromElement, boolean fromInclusive, toElement, boolean toInclusive)
Removes values range starting withfromElement
and ending withtoElement
.int
toElement, boolean toInclusive)
Removes head values range ending withtoElement
.int
fromElement, boolean fromInclusive)
Removes tail values range starting withfromElement
.o)
Returns rank of value, with the scores ordered from high to low.-
Methods inherited from interface org.redisson.api.RCollectionAsync
addAllAsync, addAsync, 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.RLexSortedSetAsync
countAsync, countHeadAsync, countTailAsync, firstAsync, lastAsync, pollFirstAsync, pollLastAsync, rangeAsync, rangeAsync, rangeAsync, rangeHeadAsync, rangeHeadAsync, rangeHeadReversedAsync, rangeHeadReversedAsync, rangeReversedAsync, rangeReversedAsync, rangeTailAsync, rangeTailAsync, rangeTailReversedAsync, rangeTailReversedAsync, rankAsync, readAllAsync, removeRangeAsync, removeRangeHeadAsync, removeRangeTailAsync, 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
addAsync, mapReduce, readAll, readAllAsync, removeAsync, trySetComparator
-
-
-
-
Method Detail
-
pollFirst
pollFirst()
Removes and returns the head element ornull
if this sorted set is empty.- Returns:
- the head element,
or
null
if this sorted set is empty
-
pollLast
pollLast()
Removes and returns the tail element ornull
if this sorted set is empty.- Returns:
- the tail element or
null
if this sorted set is empty
-
revRank
revRank( o)
Returns rank of value, with the scores ordered from high to low.- Parameters:
o
- - object- Returns:
- rank or
null
if value does not exist
-
removeRangeTail
int removeRangeTail( fromElement, boolean fromInclusive)
Removes tail values range starting withfromElement
.- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusive- Returns:
- number of elements removed
-
removeRangeHead
int removeRangeHead( toElement, boolean toInclusive)
Removes head values range ending withtoElement
.- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- number of elements removed
-
removeRange
int removeRange( fromElement, boolean fromInclusive, toElement, boolean toInclusive)
Removes values range starting withfromElement
and ending withtoElement
.- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- number of elements removed
-
countTail
int countTail( fromElement, boolean fromInclusive)
Returns the number of tail values starting withfromElement
.- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusive- Returns:
- number of elements
-
countHead
int countHead( toElement, boolean toInclusive)
Returns the number of head values ending withtoElement
.- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- number of elements
-
rangeTail
<> rangeTail( fromElement, boolean fromInclusive)
Returns tail values range starting withfromElement
.- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusive- Returns:
- collection of elements
-
rangeHead
<> rangeHead( toElement, boolean toInclusive)
Returns head values range ending withtoElement
.- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- collection of elements
-
range
<> range( fromElement, boolean fromInclusive, toElement, boolean toInclusive)
Returns values range starting withfromElement
and ending withtoElement
.- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- collection of elements
-
rangeTail
<> rangeTail( fromElement, boolean fromInclusive, int offset, int count)
Returns tail values range starting withfromElement
. Returned collection limited bycount
and starts withoffset
.- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
rangeHead
<> rangeHead( toElement, boolean toInclusive, int offset, int count)
Returns head values range ending withtoElement
. Returned collection limited bycount
and starts withoffset
.- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
range
<> range( fromElement, boolean fromInclusive, toElement, boolean toInclusive, int offset, int count)
Returns values range starting withfromElement
and ending withtoElement
. Returned collection limited bycount
and starts withoffset
.- 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
<> rangeTailReversed( fromElement, boolean fromInclusive)
Returns tail values range in reverse order starting withfromElement
.- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusive- Returns:
- collection of elements
-
rangeHeadReversed
<> rangeHeadReversed( toElement, boolean toInclusive)
Returns head values range in reverse order ending withtoElement
.- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- collection of elements
-
rangeReversed
<> rangeReversed( fromElement, boolean fromInclusive, toElement, boolean toInclusive)
Returns values range in reverse order starting withfromElement
and ending withtoElement
.- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- collection of elements
-
rangeTailReversed
<> rangeTailReversed( fromElement, boolean fromInclusive, int offset, int count)
Returns tail values range in reverse order starting withfromElement
. Returned collection limited bycount
and starts withoffset
.- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
rangeHeadReversed
<> rangeHeadReversed( toElement, boolean toInclusive, int offset, int count)
Returns head values range in reverse order ending withtoElement
. Returned collection limited bycount
and starts withoffset
.- Parameters:
toElement
- - end elementtoInclusive
- - end element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
rangeReversed
<> rangeReversed( fromElement, boolean fromInclusive, toElement, boolean toInclusive, int offset, int count)
Returns values range in reverse order starting withfromElement
and ending withtoElement
. Returned collection limited bycount
and starts withoffset
.- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusiveoffset
- - offset of result collectioncount
- - amount of result collection- Returns:
- collection of elements
-
count
int count( fromElement, boolean fromInclusive, toElement, boolean toInclusive)
Returns the number of elements betweenfromElement
andtoElement
.- Parameters:
fromElement
- - start elementfromInclusive
- - start element inclusivetoElement
- - end elementtoInclusive
- - end element inclusive- Returns:
- number of elements
-
rank
rank( o)
Returns rank of the element- Parameters:
o
- - element to rank- Returns:
- rank or
null
if element does not exist
-
range
<> range(int startIndex, int endIndex)
Returns values by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- collection of elements
-
-