Package org.redisson.api
Interface RListAsync<V>
- Type Parameters:
V- the type of elements held in this collection
- All Superinterfaces:
RandomAccess,RCollectionAsync<V>,RExpirableAsync,RObjectAsync,RSortableAsync<List<V>>
- All Known Subinterfaces:
RList<V>
- All Known Implementing Classes:
RedissonBlockingDeque,RedissonBlockingQueue,RedissonBoundedBlockingQueue,RedissonDeque,RedissonList,RedissonListMultimapValues,RedissonPriorityBlockingDeque,RedissonPriorityBlockingQueue,RedissonPriorityDeque,RedissonPriorityQueue,RedissonQueue,RedissonRingBuffer,RedissonSubList
Async list functions
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionaddAfterAsync(V elementToFind, V element) InsertselementafterelementToFindaddAllAsync(int index, Collection<? extends V> elements) Insertselementsatindex.Insertselementatindex.addBeforeAsync(V elementToFind, V element) InsertselementbeforeelementToFindaddListenerAsync(ObjectListener listener) Adds object event listenerfastRemoveAsync(int index) Removes element atindex.fastSetAsync(int index, V element) Setelementatindex.getAsync(int index) Get element atindexgetAsync(int... indexes) Loads elements by specifiedindexesindexOfAsync(Object element) Returns last index ofelementor -1 if element isn't foundlastIndexOfAsync(Object element) Returns last index ofelementor -1 if element isn't foundrangeAsync(int toIndex) Returns range of values from 0 index totoIndex.rangeAsync(int fromIndex, int toIndex) Returns range of values fromfromIndextotoIndexindex including.Read all elements at onceremoveAsync(int index) Removes element atindex.removeAsync(Object element, int count) Removes up tocountoccurrences ofelementSetelementatindexand returns previous element.trimAsync(int fromIndex, int toIndex) Trim list and remains elements only in specified rangefromIndex, inclusive, andtoIndex, inclusive.Methods inherited from interface org.redisson.api.RCollectionAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsyncMethods 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.RObjectAsync
copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsyncMethods inherited from interface org.redisson.api.RSortableAsync
readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync
-
Method Details
-
getAsync
Loads elements by specifiedindexes- Parameters:
indexes- of elements- Returns:
- elements
-
addAfterAsync
InsertselementafterelementToFind- Parameters:
elementToFind- - object to findelement- - object to add- Returns:
- new list size
-
addBeforeAsync
InsertselementbeforeelementToFind- Parameters:
elementToFind- - object to findelement- - object to add- Returns:
- new list size
-
addAsync
Insertselementatindex. Subsequent elements are shifted.- Parameters:
index- - index numberelement- - element to insert- Returns:
trueif list was changed
-
addAllAsync
Insertselementsatindex. Subsequent elements are shifted.- Parameters:
index- - index numberelements- - elements to insert- Returns:
trueif list changed orfalseif element isn't found
-
lastIndexOfAsync
Returns last index ofelementor -1 if element isn't found- Parameters:
element- to find- Returns:
- index of -1 if element isn't found
-
indexOfAsync
Returns last index ofelementor -1 if element isn't found- Parameters:
element- to find- Returns:
- index of -1 if element isn't found
-
fastSetAsync
- Parameters:
index- - index of objectelement- - object- Returns:
- void
-
setAsync
Setelementatindexand returns previous element.- Parameters:
index- - index of objectelement- - object- Returns:
- previous element or
nullif element wasn't set.
-
getAsync
Get element atindex- Parameters:
index- - index of object- Returns:
- element
-
readAllAsync
Read all elements at once- Returns:
- list of values
-
trimAsync
Trim list and remains elements only in specified rangefromIndex, inclusive, andtoIndex, inclusive.- Parameters:
fromIndex- - from indextoIndex- - to index- Returns:
- void
-
fastRemoveAsync
Removes element atindex. Works faster thanremoveAsync(Object, int)but doesn't return element.- Parameters:
index- - index of object- Returns:
- void
-
removeAsync
Removes element atindex.- Parameters:
index- - index of object- Returns:
- element or
nullif element wasn't set.
-
removeAsync
Removes up tocountoccurrences ofelement- Parameters:
element- - element to findcount- - amount occurrences- Returns:
trueif at least one element removed; orfalseif element isn't found
-
rangeAsync
Returns range of values from 0 index totoIndex. Indexes are zero based.-1means the last element,-2means penultimate and so on.- Parameters:
toIndex- - end index- Returns:
- elements
-
rangeAsync
Returns range of values fromfromIndextotoIndexindex including. Indexes are zero based.-1means the last element,-2means penultimate and so on.- Parameters:
fromIndex- - start indextoIndex- - end index- Returns:
- elements
-
addListenerAsync
Adds object event listener- Specified by:
addListenerAsyncin interfaceRObjectAsync- Parameters:
listener- - object event listener- Returns:
- listener id
- See Also:
-