Package org.redisson.api
Interface RLexSortedSetAsync
-
- All Superinterfaces:
RCollectionAsync<String>,RExpirableAsync,RObjectAsync
- All Known Subinterfaces:
RLexSortedSet
- All Known Implementing Classes:
RedissonLexSortedSet
public interface RLexSortedSetAsync extends RCollectionAsync<String>
Async interface for sorted set contained values of String type.- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RFuture<Integer>countAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive)Returns the number of elements betweenfromElementandtoElement.RFuture<Integer>countHeadAsync(String toElement, boolean toInclusive)Returns the number of head values ending withtoElement.RFuture<Integer>countTailAsync(String fromElement, boolean fromInclusive)Returns the number of tail values starting withfromElement.RFuture<String>firstAsync()Returns the first element.RFuture<String>lastAsync()Returns the last element.RFuture<String>pollFirstAsync()Removes and returns the head element ornullif this sorted set is empty.RFuture<String>pollLastAsync()Removes and returns the tail element ornullif this sorted set is empty.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.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.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.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.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.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.RFuture<Integer>rankAsync(String o)Returns rank of the elementRFuture<Collection<String>>readAllAsync()Read all values at once.RFuture<Integer>removeRangeAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive)Removes values range starting withfromElementand ending withtoElement.RFuture<Integer>removeRangeHeadAsync(String toElement, boolean toInclusive)Removes head values range ending withtoElement.RFuture<Integer>removeRangeTailAsync(String fromElement, boolean fromInclusive)Removes tail values range starting withfromElement.RFuture<Integer>revRankAsync(String 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.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
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
-
-
-
-
Method Detail
-
pollLastAsync
RFuture<String> pollLastAsync()
Removes and returns the tail element ornullif this sorted set is empty.- Returns:
- the tail element or
nullif this sorted set is empty
-
pollFirstAsync
RFuture<String> pollFirstAsync()
Removes and returns the head element ornullif this sorted set is empty.- Returns:
- the head element,
or
nullif this sorted set is empty
-
readAllAsync
RFuture<Collection<String>> readAllAsync()
Read all values at once.- Returns:
- collection of values
-
removeRangeAsync
RFuture<Integer> removeRangeAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive)
Removes values range starting withfromElementand ending withtoElement.- Parameters:
fromElement- - start elementfromInclusive- - start element inclusivetoElement- - end elementtoInclusive- - end element inclusive- Returns:
- number of elements removed
-
removeRangeTailAsync
RFuture<Integer> removeRangeTailAsync(String fromElement, boolean fromInclusive)
Removes tail values range starting withfromElement.- Parameters:
fromElement- - start elementfromInclusive- - start element inclusive- Returns:
- number of elements removed
-
removeRangeHeadAsync
RFuture<Integer> removeRangeHeadAsync(String toElement, boolean toInclusive)
Removes head values range ending withtoElement.- Parameters:
toElement- - end elementtoInclusive- - end element inclusive- Returns:
- number of elements removed
-
countTailAsync
RFuture<Integer> countTailAsync(String fromElement, boolean fromInclusive)
Returns the number of tail values starting withfromElement.- Parameters:
fromElement- - start elementfromInclusive- - start element inclusive- Returns:
- number of elements
-
countHeadAsync
RFuture<Integer> countHeadAsync(String toElement, boolean toInclusive)
Returns the number of head values ending withtoElement.- Parameters:
toElement- - end elementtoInclusive- - end element inclusive- Returns:
- number of elements
-
rangeTailAsync
RFuture<Collection<String>> rangeTailAsync(String fromElement, boolean fromInclusive)
Returns tail values range starting withfromElement.- Parameters:
fromElement- - start elementfromInclusive- - start element inclusive- Returns:
- collection of elements
-
rangeHeadAsync
RFuture<Collection<String>> rangeHeadAsync(String toElement, boolean toInclusive)
Returns head values range ending withtoElement.- Parameters:
toElement- - end elementtoInclusive- - end element inclusive- Returns:
- collection of elements
-
rangeAsync
RFuture<Collection<String>> rangeAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive)
Returns values range starting withfromElementand ending withtoElement.- Parameters:
fromElement- - start elementfromInclusive- - start element inclusivetoElement- - end elementtoInclusive- - end element inclusive- Returns:
- collection of elements
-
rangeTailAsync
RFuture<Collection<String>> rangeTailAsync(String fromElement, boolean fromInclusive, int offset, int count)
Returns tail values range starting withfromElement. Returned collection limited bycountand starts withoffset.- Parameters:
fromElement- - start elementfromInclusive- - start element inclusiveoffset- - offset of result collectioncount- - amount of result collection- Returns:
- collection of elements
-
rangeHeadAsync
RFuture<Collection<String>> rangeHeadAsync(String toElement, boolean toInclusive, int offset, int count)
Returns head values range ending withtoElement. Returned collection limited bycountand starts withoffset.- Parameters:
toElement- - end elementtoInclusive- - end element inclusiveoffset- - offset of result collectioncount- - amount of result collection- Returns:
- collection of elements
-
rangeAsync
RFuture<Collection<String>> rangeAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive, int offset, int count)
Returns values range starting withfromElementand ending withtoElement. Returned collection limited bycountand 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
-
rangeTailReversedAsync
RFuture<Collection<String>> rangeTailReversedAsync(String fromElement, boolean fromInclusive)
Returns tail values range in reverse order starting withfromElement.- Parameters:
fromElement- - start elementfromInclusive- - start element inclusive- Returns:
- collection of elements
-
rangeHeadReversedAsync
RFuture<Collection<String>> rangeHeadReversedAsync(String toElement, boolean toInclusive)
Returns head values range in reverse order ending withtoElement.- Parameters:
toElement- - end elementtoInclusive- - end element inclusive- Returns:
- collection of elements
-
rangeReversedAsync
RFuture<Collection<String>> rangeReversedAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive)
Returns values range in reverse order starting withfromElementand ending withtoElement.- Parameters:
fromElement- - start elementfromInclusive- - start element inclusivetoElement- - end elementtoInclusive- - end element inclusive- Returns:
- collection of elements
-
rangeTailReversedAsync
RFuture<Collection<String>> rangeTailReversedAsync(String fromElement, boolean fromInclusive, int offset, int count)
Returns tail values range in reverse order starting withfromElement. Returned collection limited bycountand starts withoffset.- Parameters:
fromElement- - start elementfromInclusive- - start element inclusiveoffset- - offset of result collectioncount- - amount of result collection- Returns:
- collection of elements
-
rangeHeadReversedAsync
RFuture<Collection<String>> rangeHeadReversedAsync(String toElement, boolean toInclusive, int offset, int count)
Returns head values range in reverse order ending withtoElement. Returned collection limited bycountand starts withoffset.- Parameters:
toElement- - end elementtoInclusive- - end element inclusiveoffset- - offset of result collectioncount- - amount of result collection- Returns:
- collection of elements
-
rangeReversedAsync
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. Returned collection limited bycountand 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
-
countAsync
RFuture<Integer> countAsync(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive)
Returns the number of elements betweenfromElementandtoElement.- Parameters:
fromElement- - start elementfromInclusive- - start element inclusivetoElement- - end elementtoInclusive- - end element inclusive- Returns:
- number of elements
-
rankAsync
RFuture<Integer> rankAsync(String o)
Returns rank of the element- Parameters:
o- - element to rank- Returns:
- rank or
nullif element does not exist
-
rangeAsync
RFuture<Collection<String>> rangeAsync(int startIndex, int endIndex)
Returns values by rank range. Indexes are zero based.-1means the highest score,-2means the second highest score.- Parameters:
startIndex- - start indexendIndex- - end index- Returns:
- collection of elements
-
-