Package org.redisson
Class RedissonList<V>
java.lang.Object
org.redisson.RedissonObject
org.redisson.RedissonList<V>
- Type Parameters:
V- the type of elements held in this collection
- All Implemented Interfaces:
Iterable<V>,Collection<V>,List<V>,RandomAccess,RCollectionAsync<V>,RExpirable,RExpirableAsync,RList<V>,RListAsync<V>,RObject,RObjectAsync,RSortable<List<V>>,RSortableAsync<List<V>>
- Direct Known Subclasses:
RedissonPriorityQueue,RedissonQueue,RedissonSubList
Distributed and concurrent implementation of
List- Author:
- Nikita Koksharov
-
Field Summary
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name -
Constructor Summary
ConstructorsConstructorDescriptionRedissonList(Codec codec, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson) RedissonList(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanintAddelementafterelementToFindaddAfterAsync(V elementToFind, V element) InsertselementafterelementToFindbooleanaddAll(int index, Collection<? extends V> coll) booleanaddAll(Collection<? extends V> c) addAllAsync(int index, Collection<? extends V> coll) Insertselementsatindex.addAllAsync(Collection<? extends V> c) Adds all elements contained in the specified collectionInsertselementatindex.Adds element into this collection.protected <T> RFuture<T>addAsync(V e, RedisCommand<T> command) intAddelementbeforeelementToFindaddBeforeAsync(V elementToFind, V element) InsertselementbeforeelementToFindintaddListener(ObjectListener listener) Adds object event listeneraddListenerAsync(ObjectListener listener) Adds object event listenervoidclear()booleanClear an expire timeout or expire date for object.Clear an expire timeout or expire date for object in async mode.clearExpireAsync(String... keys) booleanbooleancontainsAll(Collection<?> c) containsAllAsync(Collection<?> c) Returnstrueif this collection contains all of the elements in the specified collection.Returnstrueif this collection contains encoded state of the specified element.distributedIterator(int count) Returns element iterator that can be shared across multiple applications.distributedIterator(String iteratorName, int count) Returns iterator over elements that match specified pattern.booleanbooleanUseRExpirable.expire(Duration)insteadbooleanSets a timeout for this object.booleanSets an expiration date for this object.expireAsync(long timeToLive, TimeUnit timeUnit) UseRExpirableAsync.expireAsync(Duration)insteadexpireAsync(long timeToLive, TimeUnit timeUnit, String param, String... keys) expireAsync(Duration duration) Set a timeout for object.expireAsync(Instant instant) Set an expire date for object.booleanexpireAt(long timestamp) UseRExpirable.expire(Instant)insteadbooleanUseRExpirable.expire(Instant)insteadexpireAtAsync(long timestamp) UseRExpirableAsync.expireAsync(Instant)insteadexpireAtAsync(long timestamp, String param, String... keys) expireAtAsync(Date timestamp) UseRExpirableAsync.expireAsync(Instant)insteadbooleanexpireIfGreater(Duration duration) Sets a timeout for this object only if it's greater than timeout set before.booleanexpireIfGreater(Instant time) Sets an expiration date for this object only if it's greater than expiration date set before.expireIfGreaterAsync(Duration duration) Sets a timeout for this object only if it's greater than timeout set before.expireIfGreaterAsync(Instant time) Sets an expiration date for this object only if it's greater than expiration date set before.booleanexpireIfLess(Duration duration) Sets a timeout for this object only if it's less than timeout set before.booleanexpireIfLess(Instant time) Sets an expiration date for this object only if it's less than expiration date set before.expireIfLessAsync(Duration duration) Sets a timeout for this object only if it's less than timeout set before.expireIfLessAsync(Instant time) Sets an expiration date for this object only if it's less than expiration date set before.booleanexpireIfNotSet(Duration duration) Sets a timeout for this object only if it hasn't been set before.booleanexpireIfNotSet(Instant time) Sets an expiration date for this object only if it hasn't been set before.expireIfNotSetAsync(Duration duration) Sets a timeout for this object only if it hasn't been set before.expireIfNotSetAsync(Instant time) Sets an expiration date for this object only if it hasn't been set before.booleanexpireIfSet(Duration duration) Sets a timeout for this object only if it has been already set.booleanexpireIfSet(Instant time) Sets an expiration date for this object only if it has been already set.expireIfSetAsync(Duration duration) Sets a timeout for this object only if it has been already set.expireIfSetAsync(Instant time) Sets an expiration date for this object only if it has been already set.voidfastRemove(int index) Remove object by specified indexfastRemoveAsync(int index) Removes element atindex.voidSetelementatindex.fastSetAsync(int index, V element) Setelementatindex.get(int index) get(int... indexes) Loads elements by specifiedindexesgetAsync(int index) Get element atindexgetAsync(int... indexes) Loads elements by specifiedindexeslongExpiration time of Redisson object that has a timeoutExpiration time of Redisson object that has a timeoutinthashCode()intReturns last index ofelementor -1 if element isn't found<R> RFuture<R>indexOfAsync(Object o, Convertor<R> convertor) booleanisEmpty()iterator()intReturns last index ofelementor -1 if element isn't found<R> RFuture<R>lastIndexOfAsync(Object o, Convertor<R> convertor) listIterator(int ind) <KOut,VOut>
RCollectionMapReduce<V,KOut, VOut> ReturnsRMapReduceobject associated with this maprange(int toIndex) Returns range of values from 0 index totoIndex.range(int fromIndex, int toIndex) Returns range of values fromfromIndextotoIndexindex including.rangeAsync(int toIndex) Returns range of values from 0 index totoIndex.rangeAsync(int fromIndex, int toIndex) Returns range of values fromfromIndextotoIndexindex including.readAll()Read all elements at onceRead all elements at once<T> Collection<T>Read data in sorted view<T> Collection<T>Read data in sorted viewRead data in sorted viewRead data in sorted viewRead data in sorted viewRead data in sorted view<T> Collection<T>readSortAlpha(String byPattern, List<String> getPatterns, SortOrder order) Read data in sorted view lexicographically<T> Collection<T>readSortAlpha(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Read data in sorted view lexicographicallyreadSortAlpha(String byPattern, SortOrder order) Read data in sorted view lexicographicallyreadSortAlpha(String byPattern, SortOrder order, int offset, int count) Read data in sorted view lexicographicallyreadSortAlpha(SortOrder order) Read data in sorted view lexicographicallyreadSortAlpha(SortOrder order, int offset, int count) Read data in sorted view lexicographically<T> RFuture<Collection<T>>readSortAlphaAsync(String byPattern, List<String> getPatterns, SortOrder order) Read data in sorted view lexicographically<T> RFuture<Collection<T>>readSortAlphaAsync(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Read data in sorted view lexicographicallyreadSortAlphaAsync(String byPattern, SortOrder order) Read data in sorted view lexicographicallyreadSortAlphaAsync(String byPattern, SortOrder order, int offset, int count) Read data in sorted view lexicographicallyreadSortAlphaAsync(SortOrder order) Read data in sorted view lexicographicallyreadSortAlphaAsync(SortOrder order, int offset, int count) Read data in sorted view lexicographically<T> RFuture<Collection<T>>readSortAsync(String byPattern, List<String> getPatterns, SortOrder order) Read data in sorted view<T> RFuture<Collection<T>>readSortAsync(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Read data in sorted viewreadSortAsync(String byPattern, SortOrder order) Read data in sorted viewreadSortAsync(String byPattern, SortOrder order, int offset, int count) Read data in sorted viewreadSortAsync(SortOrder order) Read data in sorted viewreadSortAsync(SortOrder order, int offset, int count) Read data in sorted viewlongRemaining time to live of Redisson object that has a timeoutRemaining time to live of Redisson object that has a timeoutremove(int index) booleanbooleanRemoves up tocountoccurrences ofelementbooleanremoveAll(Collection<?> c) removeAllAsync(Collection<?> c) Removes all of this collection's elements that are also contained in the specified collection.removeAsync(int index) Removes element atindex.Removes a single instance of the specified element from this collection, if it is present.removeAsync(Object o, int count) Removes up tocountoccurrences ofelementbooleanvoidremoveListener(int listenerId) Removes object event listenerremoveListenerAsync(int listenerId) Removes object event listenerbooleanretainAll(Collection<?> c) retainAllAsync(Collection<?> c) Retains only the elements in this collection that are contained in the specified collection.Setelementatindexand returns previous element.intsize()Returns number of elements in this collection.intSort data and store todestNamelistintsortTo(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Sort data and store todestNamelistintSort data and store todestNamelistintSort data and store todestNamelistintSort data and store todestNamelistintSort data and store todestNamelistSort data and store todestNamelistsortToAsync(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Sort data and store todestNamelistsortToAsync(String destName, String byPattern, SortOrder order) Sort data and store todestNamelistsortToAsync(String destName, String byPattern, SortOrder order, int offset, int count) Sort data and store todestNamelistsortToAsync(String destName, SortOrder order) Sort data and store todestNamelistsortToAsync(String destName, SortOrder order, int offset, int count) Sort data and store todestNamelistsubList(int fromIndex, int toIndex) Object[]toArray()<T> T[]toArray(T[] a) toString()voidtrim(int fromIndex, int toIndex) Trim list and remains elements only in specified rangefromIndex, inclusive, andtoIndex, inclusive.trimAsync(int fromIndex, int toIndex) Trim list and remains elements only in specified rangefromIndex, inclusive, andtoIndex, inclusive.Methods inherited from class org.redisson.RedissonObject
addListener, addListenerAsync, copy, copyAsync, delete, deleteAsync, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsyncMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
replaceAll, sort, spliteratorMethods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLiveMethods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsyncMethods inherited from interface org.redisson.api.RObject
copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkMethods inherited from interface org.redisson.api.RObjectAsync
copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
Constructor Details
-
RedissonList
-
RedissonList
public RedissonList(Codec codec, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
-
-
Method Details
-
mapReduce
Description copied from interface:RListReturnsRMapReduceobject associated with this map -
size
public int size() -
sizeAsync
Description copied from interface:RCollectionAsyncReturns number of elements in this collection.- Specified by:
sizeAsyncin interfaceRCollectionAsync<V>- Returns:
- size of collection
-
isEmpty
public boolean isEmpty() -
contains
-
iterator
-
toArray
-
readAll
Description copied from interface:RListRead all elements at once -
readAllAsync
Description copied from interface:RListAsyncRead all elements at once- Specified by:
readAllAsyncin interfaceRListAsync<V>- Returns:
- list of values
-
toArray
public <T> T[] toArray(T[] a) -
add
-
addAsync
Description copied from interface:RCollectionAsyncAdds element into this collection.- Specified by:
addAsyncin interfaceRCollectionAsync<V>- Parameters:
e- - element to add- Returns:
trueif an element was added andfalseif it is already present
-
addAsync
-
remove
-
removeAsync
Description copied from interface:RCollectionAsyncRemoves a single instance of the specified element from this collection, if it is present.- Specified by:
removeAsyncin interfaceRCollectionAsync<V>- Parameters:
o- element to be removed from this collection, if present- Returns:
trueif an element was removed as a result of this call
-
removeAsync
Description copied from interface:RListAsyncRemoves up tocountoccurrences ofelement- Specified by:
removeAsyncin interfaceRListAsync<V>- Parameters:
o- - element to findcount- - amount occurrences- Returns:
trueif at least one element removed; orfalseif element isn't found
-
remove
Description copied from interface:RListRemoves up tocountoccurrences ofelement -
containsAllAsync
Description copied from interface:RCollectionAsyncReturnstrueif this collection contains all of the elements in the specified collection.- Specified by:
containsAllAsyncin interfaceRCollectionAsync<V>- Parameters:
c- collection to be checked for containment in this collection- Returns:
trueif this collection contains all of the elements in the specified collection
-
containsAll
- Specified by:
containsAllin interfaceCollection<V>- Specified by:
containsAllin interfaceList<V>
-
addAll
-
addAllAsync
Description copied from interface:RCollectionAsyncAdds all elements contained in the specified collection- Specified by:
addAllAsyncin interfaceRCollectionAsync<V>- Parameters:
c- - collection of elements to add- Returns:
trueif at least one element was added andfalseif all elements are already present
-
addAllAsync
Description copied from interface:RListAsyncInsertselementsatindex. Subsequent elements are shifted.- Specified by:
addAllAsyncin interfaceRListAsync<V>- Parameters:
index- - index numbercoll- - elements to insert- Returns:
trueif list changed orfalseif element isn't found
-
addAll
-
removeAllAsync
Description copied from interface:RCollectionAsyncRemoves all of this collection's elements that are also contained in the specified collection.- Specified by:
removeAllAsyncin interfaceRCollectionAsync<V>- Parameters:
c- collection containing elements to be removed from this collection- Returns:
trueif this collection changed as a result of the call
-
removeAll
-
retainAll
-
retainAllAsync
Description copied from interface:RCollectionAsyncRetains only the elements in this collection that are contained in the specified collection.- Specified by:
retainAllAsyncin interfaceRCollectionAsync<V>- Parameters:
c- collection containing elements to be retained in this collection- Returns:
trueif this collection changed as a result of the call
-
clear
public void clear() -
getAsync
Description copied from interface:RListAsyncGet element atindex- Specified by:
getAsyncin interfaceRListAsync<V>- Parameters:
index- - index of object- Returns:
- element
-
get
Description copied from interface:RListLoads elements by specifiedindexes -
distributedIterator
Description copied from interface:RListReturns element iterator that can be shared across multiple applications. Creating multiple iterators on the same object with this method will result in a single shared iterator. See RList.distributedIterator(String, int) for creating different iterators.- Specified by:
distributedIteratorin interfaceRList<V>- Parameters:
count- batch size- Returns:
- shared elements iterator
-
distributedIterator
Description copied from interface:RListReturns iterator over elements that match specified pattern. Iterator can be shared across multiple applications. Creating multiple iterators on the same object with this method will result in a single shared iterator. Iterator name must be resolved to the same hash slot as list name.- Specified by:
distributedIteratorin interfaceRList<V>- Parameters:
iteratorName- redis object name to which cursor will be savedcount- batch size- Returns:
- shared elements iterator
-
getAsync
Description copied from interface:RListAsyncLoads elements by specifiedindexes- Specified by:
getAsyncin interfaceRListAsync<V>- Parameters:
indexes- of elements- Returns:
- elements
-
get
-
set
-
setAsync
Description copied from interface:RListAsyncSetelementatindexand returns previous element.- Specified by:
setAsyncin interfaceRListAsync<V>- Parameters:
index- - index of objectelement- - object- Returns:
- previous element or
nullif element wasn't set.
-
fastSet
Description copied from interface:RList -
fastSetAsync
Description copied from interface:RListAsyncSetelementatindex. Works faster thanRListAsync.setAsync(int, Object)but doesn't return previous element.- Specified by:
fastSetAsyncin interfaceRListAsync<V>- Parameters:
index- - index of objectelement- - object- Returns:
- void
-
add
-
addAsync
Description copied from interface:RListAsyncInsertselementatindex. Subsequent elements are shifted.- Specified by:
addAsyncin interfaceRListAsync<V>- Parameters:
index- - index numberelement- - element to insert- Returns:
trueif list was changed
-
remove
-
removeAsync
Description copied from interface:RListAsyncRemoves element atindex.- Specified by:
removeAsyncin interfaceRListAsync<V>- Parameters:
index- - index of object- Returns:
- element or
nullif element wasn't set.
-
fastRemove
public void fastRemove(int index) Description copied from interface:RListRemove object by specified index- Specified by:
fastRemovein interfaceRList<V>- Parameters:
index- - index of object
-
fastRemoveAsync
Description copied from interface:RListAsyncRemoves element atindex. Works faster thanRListAsync.removeAsync(Object, int)but doesn't return element.- Specified by:
fastRemoveAsyncin interfaceRListAsync<V>- Parameters:
index- - index of object- Returns:
- void
-
indexOf
-
containsAsync
Description copied from interface:RCollectionAsyncReturnstrueif this collection contains encoded state of the specified element.- Specified by:
containsAsyncin interfaceRCollectionAsync<V>- Parameters:
o- element whose presence in this collection is to be tested- Returns:
trueif this collection contains the specified element andfalseotherwise
-
indexOfAsync
-
indexOfAsync
Description copied from interface:RListAsyncReturns last index ofelementor -1 if element isn't found- Specified by:
indexOfAsyncin interfaceRListAsync<V>- Parameters:
o- to find- Returns:
- index of -1 if element isn't found
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<V>
-
lastIndexOfAsync
Description copied from interface:RListAsyncReturns last index ofelementor -1 if element isn't found- Specified by:
lastIndexOfAsyncin interfaceRListAsync<V>- Parameters:
o- to find- Returns:
- index of -1 if element isn't found
-
lastIndexOfAsync
-
trim
public void trim(int fromIndex, int toIndex) Description copied from interface:RListTrim list and remains elements only in specified rangefromIndex, inclusive, andtoIndex, inclusive. -
trimAsync
Description copied from interface:RListAsyncTrim list and remains elements only in specified rangefromIndex, inclusive, andtoIndex, inclusive.- Specified by:
trimAsyncin interfaceRListAsync<V>- Parameters:
fromIndex- - from indextoIndex- - to index- Returns:
- void
-
listIterator
- Specified by:
listIteratorin interfaceList<V>
-
listIterator
- Specified by:
listIteratorin interfaceList<V>
-
subList
-
toString
-
equals
-
hashCode
public int hashCode() -
addAfterAsync
Description copied from interface:RListAsyncInsertselementafterelementToFind- Specified by:
addAfterAsyncin interfaceRListAsync<V>- Parameters:
elementToFind- - object to findelement- - object to add- Returns:
- new list size
-
addBeforeAsync
Description copied from interface:RListAsyncInsertselementbeforeelementToFind- Specified by:
addBeforeAsyncin interfaceRListAsync<V>- Parameters:
elementToFind- - object to findelement- - object to add- Returns:
- new list size
-
addAfter
Description copied from interface:RListAddelementafterelementToFind -
addBefore
Description copied from interface:RListAddelementbeforeelementToFind -
readSort
Description copied from interface:RSortableRead data in sorted view -
readSortAsync
Description copied from interface:RSortableAsyncRead data in sorted view- Specified by:
readSortAsyncin interfaceRSortableAsync<V>- Parameters:
order- for sorted data- Returns:
- sorted collection
-
readSort
Description copied from interface:RSortableRead data in sorted view -
readSortAsync
Description copied from interface:RSortableAsyncRead data in sorted view- Specified by:
readSortAsyncin interfaceRSortableAsync<V>- Parameters:
order- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- sorted collection
-
readSort
Description copied from interface:RSortableRead data in sorted view -
readSortAsync
Description copied from interface:RSortableAsyncRead data in sorted view- Specified by:
readSortAsyncin interfaceRSortableAsync<V>- Parameters:
byPattern- that is used to generate the keys that are used for sortingorder- for sorted data- Returns:
- sorted collection
-
readSort
Description copied from interface:RSortableRead data in sorted view -
readSortAsync
Description copied from interface:RSortableAsyncRead data in sorted view- Specified by:
readSortAsyncin interfaceRSortableAsync<V>- Parameters:
byPattern- that is used to generate the keys that are used for sortingorder- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- sorted collection
-
readSort
Description copied from interface:RSortableRead data in sorted view -
readSortAsync
public <T> RFuture<Collection<T>> readSortAsync(String byPattern, List<String> getPatterns, SortOrder order) Description copied from interface:RSortableAsyncRead data in sorted view- Specified by:
readSortAsyncin interfaceRSortableAsync<V>- Type Parameters:
T- object type- Parameters:
byPattern- that is used to generate the keys that are used for sortinggetPatterns- that is used to load values by keys in sorted vieworder- for sorted data- Returns:
- sorted collection
-
readSort
public <T> Collection<T> readSort(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Description copied from interface:RSortableRead data in sorted view- Specified by:
readSortin interfaceRSortable<V>- Type Parameters:
T- object type- Parameters:
byPattern- that is used to generate the keys that are used for sortinggetPatterns- that is used to load values by keys in sorted vieworder- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- sorted collection
-
readSortAsync
public <T> RFuture<Collection<T>> readSortAsync(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Description copied from interface:RSortableAsyncRead data in sorted view- Specified by:
readSortAsyncin interfaceRSortableAsync<V>- Type Parameters:
T- object type- Parameters:
byPattern- that is used to generate the keys that are used for sortinggetPatterns- that is used to load values by keys in sorted vieworder- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- sorted collection
-
readSortAlpha
Description copied from interface:RSortableRead data in sorted view lexicographically- Specified by:
readSortAlphain interfaceRSortable<V>- Parameters:
order- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
Description copied from interface:RSortableAsyncRead data in sorted view lexicographically- Specified by:
readSortAlphaAsyncin interfaceRSortableAsync<V>- Parameters:
order- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
Description copied from interface:RSortableRead data in sorted view lexicographically- Specified by:
readSortAlphain interfaceRSortable<V>- Parameters:
order- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
Description copied from interface:RSortableAsyncRead data in sorted view lexicographically- Specified by:
readSortAlphaAsyncin interfaceRSortableAsync<V>- Parameters:
order- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
Description copied from interface:RSortableRead data in sorted view lexicographically- Specified by:
readSortAlphain interfaceRSortable<V>- Parameters:
byPattern- that is used to generate the keys that are used for sortingorder- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
Description copied from interface:RSortableAsyncRead data in sorted view lexicographically- Specified by:
readSortAlphaAsyncin interfaceRSortableAsync<V>- Parameters:
byPattern- that is used to generate the keys that are used for sortingorder- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
Description copied from interface:RSortableRead data in sorted view lexicographically- Specified by:
readSortAlphain interfaceRSortable<V>- Parameters:
byPattern- that is used to generate the keys that are used for sortingorder- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public RFuture<List<V>> readSortAlphaAsync(String byPattern, SortOrder order, int offset, int count) Description copied from interface:RSortableAsyncRead data in sorted view lexicographically- Specified by:
readSortAlphaAsyncin interfaceRSortableAsync<V>- Parameters:
byPattern- that is used to generate the keys that are used for sortingorder- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
Description copied from interface:RSortableRead data in sorted view lexicographically- Specified by:
readSortAlphain interfaceRSortable<V>- Type Parameters:
T- object type- Parameters:
byPattern- that is used to generate the keys that are used for sortinggetPatterns- that is used to load values by keys in sorted vieworder- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public <T> RFuture<Collection<T>> readSortAlphaAsync(String byPattern, List<String> getPatterns, SortOrder order) Description copied from interface:RSortableAsyncRead data in sorted view lexicographically- Specified by:
readSortAlphaAsyncin interfaceRSortableAsync<V>- Type Parameters:
T- object type- Parameters:
byPattern- that is used to generate the keys that are used for sortinggetPatterns- that is used to load values by keys in sorted vieworder- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
public <T> Collection<T> readSortAlpha(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Description copied from interface:RSortableRead data in sorted view lexicographically- Specified by:
readSortAlphain interfaceRSortable<V>- Type Parameters:
T- object type- Parameters:
byPattern- that is used to generate the keys that are used for sortinggetPatterns- that is used to load values by keys in sorted vieworder- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public <T> RFuture<Collection<T>> readSortAlphaAsync(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Description copied from interface:RSortableAsyncRead data in sorted view lexicographically- Specified by:
readSortAlphaAsyncin interfaceRSortableAsync<V>- Type Parameters:
T- object type- Parameters:
byPattern- that is used to generate the keys that are used for sortinggetPatterns- that is used to load values by keys in sorted vieworder- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- sorted collection lexicographically
-
sortTo
Description copied from interface:RSortableSort data and store todestNamelist -
sortToAsync
Description copied from interface:RSortableAsyncSort data and store todestNamelist- Specified by:
sortToAsyncin interfaceRSortableAsync<V>- Parameters:
destName- list object destinationorder- for sorted data- Returns:
- length of sorted data
-
sortTo
Description copied from interface:RSortableSort data and store todestNamelist -
sortToAsync
Description copied from interface:RSortableAsyncSort data and store todestNamelist- Specified by:
sortToAsyncin interfaceRSortableAsync<V>- Parameters:
destName- list object destinationorder- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- length of sorted data
-
sortTo
Description copied from interface:RSortableSort data and store todestNamelist -
sortTo
Description copied from interface:RSortableSort data and store todestNamelist -
sortToAsync
Description copied from interface:RSortableAsyncSort data and store todestNamelist- Specified by:
sortToAsyncin interfaceRSortableAsync<V>- Parameters:
destName- list object destinationbyPattern- that is used to generate the keys that are used for sortingorder- for sorted data- Returns:
- length of sorted data
-
sortToAsync
public RFuture<Integer> sortToAsync(String destName, String byPattern, SortOrder order, int offset, int count) Description copied from interface:RSortableAsyncSort data and store todestNamelist- Specified by:
sortToAsyncin interfaceRSortableAsync<V>- Parameters:
destName- list object destinationbyPattern- that is used to generate the keys that are used for sortingorder- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- length of sorted data
-
sortTo
Description copied from interface:RSortableSort data and store todestNamelist -
sortToAsync
public RFuture<Integer> sortToAsync(String destName, String byPattern, List<String> getPatterns, SortOrder order) Description copied from interface:RSortableAsyncSort data and store todestNamelist- Specified by:
sortToAsyncin interfaceRSortableAsync<V>- Parameters:
destName- list object destinationbyPattern- that is used to generate the keys that are used for sortinggetPatterns- that is used to load values by keys in sorted vieworder- for sorted data- Returns:
- length of sorted data
-
sortTo
public int sortTo(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Description copied from interface:RSortableSort data and store todestNamelist- Specified by:
sortToin interfaceRSortable<V>- Parameters:
destName- list object destinationbyPattern- that is used to generate the keys that are used for sortinggetPatterns- that is used to load values by keys in sorted vieworder- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- length of sorted data
-
sortToAsync
public RFuture<Integer> sortToAsync(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Description copied from interface:RSortableAsyncSort data and store todestNamelist- Specified by:
sortToAsyncin interfaceRSortableAsync<V>- Parameters:
destName- list object destinationbyPattern- that is used to generate the keys that are used for sortinggetPatterns- that is used to load values by keys in sorted vieworder- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- length of sorted data
-
rangeAsync
Description copied from interface:RListAsyncReturns range of values from 0 index totoIndex. Indexes are zero based.-1means the last element,-2means penultimate and so on.- Specified by:
rangeAsyncin interfaceRListAsync<V>- Parameters:
toIndex- - end index- Returns:
- elements
-
rangeAsync
Description copied from interface:RListAsyncReturns range of values fromfromIndextotoIndexindex including. Indexes are zero based.-1means the last element,-2means penultimate and so on.- Specified by:
rangeAsyncin interfaceRListAsync<V>- Parameters:
fromIndex- - start indextoIndex- - end index- Returns:
- elements
-
range
Description copied from interface:RListReturns range of values from 0 index totoIndex. Indexes are zero based.-1means the last element,-2means penultimate and so on. -
range
Description copied from interface:RListReturns range of values fromfromIndextotoIndexindex including. Indexes are zero based.-1means the last element,-2means penultimate and so on. -
addListener
Description copied from interface:RObjectAdds object event listener- Specified by:
addListenerin interfaceRList<V>- Specified by:
addListenerin interfaceRObject- Overrides:
addListenerin classRedissonObject- Parameters:
listener- - object event listener- Returns:
- listener id
- See Also:
-
addListenerAsync
Description copied from interface:RObjectAsyncAdds object event listener- Specified by:
addListenerAsyncin interfaceRListAsync<V>- Specified by:
addListenerAsyncin interfaceRObjectAsync- Overrides:
addListenerAsyncin classRedissonObject- Parameters:
listener- - object event listener- Returns:
- listener id
- See Also:
-
removeListener
public void removeListener(int listenerId) Description copied from interface:RObjectRemoves object event listener- Specified by:
removeListenerin interfaceRObject- Overrides:
removeListenerin classRedissonObject- Parameters:
listenerId- - listener id
-
removeListenerAsync
Description copied from interface:RObjectAsyncRemoves object event listener- Specified by:
removeListenerAsyncin interfaceRObjectAsync- Overrides:
removeListenerAsyncin classRedissonObject- Parameters:
listenerId- - listener id
-
removeIf
- Specified by:
removeIfin interfaceCollection<V>
-
expire
Description copied from interface:RExpirableUseRExpirable.expire(Duration)instead- Specified by:
expirein interfaceRExpirable- Parameters:
timeToLive- - timeout before object will be deletedtimeUnit- - timeout time unit- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Duration)instead- 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
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
Description copied from interface:RExpirableSets an expiration date for this 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
-
expireIfSet
Description copied from interface:RExpirableSets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetin interfaceRExpirable- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfSetAsync
Description copied from interface:RExpirableAsyncSets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetAsyncin interfaceRExpirableAsync- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfNotSet
Description copied from interface:RExpirableSets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetin interfaceRExpirable- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfNotSetAsync
Description copied from interface:RExpirableAsyncSets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetAsyncin interfaceRExpirableAsync- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfGreater
Description copied from interface:RExpirableSets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterin interfaceRExpirable- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfGreaterAsync
Description copied from interface:RExpirableAsyncSets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterAsyncin interfaceRExpirableAsync- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfLess
Description copied from interface:RExpirableSets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessin interfaceRExpirable- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfLessAsync
Description copied from interface:RExpirableAsyncSets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessAsyncin interfaceRExpirableAsync- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
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
-
expire
Description copied from interface:RExpirableSets a timeout for this object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expirein interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
Description copied from interface:RExpirableAsyncSet a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireAt
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
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Instant)instead- Specified by:
expireAtAsyncin interfaceRExpirableAsync- Parameters:
timestamp- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfSet
Description copied from interface:RExpirableSets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetin interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfSetAsync
Description copied from interface:RExpirableAsyncSets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfNotSet
Description copied from interface:RExpirableSets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetin interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfNotSetAsync
Description copied from interface:RExpirableAsyncSets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfGreater
Description copied from interface:RExpirableSets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterin interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfGreaterAsync
Description copied from interface:RExpirableAsyncSets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfLess
Description copied from interface:RExpirableSets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessin interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfLessAsync
Description copied from interface:RExpirableAsyncSets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- 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
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
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.
-
getExpireTime
public long getExpireTime()Description copied from interface:RExpirableExpiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTimein interfaceRExpirable- Returns:
- expiration time
-
getExpireTimeAsync
Description copied from interface:RExpirableAsyncExpiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTimeAsyncin interfaceRExpirableAsync- Returns:
- expiration time
-
expireAsync
-
expireAtAsync
-
clearExpireAsync
-