Package org.redisson.api
Interface RListAsync<V>
-
- Type Parameters:
V
- the type of elements held in this collection
- All Superinterfaces:
,
<V>>
- All Known Subinterfaces:
RList<V>
- All Known Implementing Classes:
RedissonBlockingDeque
,RedissonBlockingQueue
,RedissonBoundedBlockingQueue
,RedissonDeque
,RedissonList
,RedissonListMultimapValues
,RedissonPriorityBlockingDeque
,RedissonPriorityBlockingQueue
,RedissonPriorityDeque
,RedissonPriorityQueue
,RedissonQueue
,RedissonRingBuffer
,RedissonSubList
public interface RListAsync<V> extends <V>>,
Async list functions- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description >
addAfterAsync(V elementToFind, V element)
Insertselement
afterelementToFind
>
addAllAsync(int index, <? extends V> elements)
Insertselements
atindex
.>
addAsync(int index, V element)
Insertselement
atindex
.>
addBeforeAsync(V elementToFind, V element)
Insertselement
beforeelementToFind
>
addListenerAsync(ObjectListener listener)
Adds object event listener>
fastRemoveAsync(int index)
Removes element atindex
.>
fastSetAsync(int index, V element)
Setelement
atindex
.RFuture<V>
getAsync(int index)
Get element atindex
<V>>
getAsync(int... indexes)
Loads elements by specifiedindexes
>
element)
Returns last index ofelement
or -1 if element isn't found>
element)
Returns last index ofelement
or -1 if element isn't found<V>>
rangeAsync(int toIndex)
Returns range of values from 0 index totoIndex
.<V>>
rangeAsync(int fromIndex, int toIndex)
Returns range of values fromfromIndex
totoIndex
index including.<V>>
readAllAsync()
Read all elements at onceRFuture<V>
removeAsync(int index)
Removes element atindex
.>
element, int count)
Removes up tocount
occurrences ofelement
RFuture<V>
setAsync(int index, V element)
Setelement
atindex
and 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, sizeAsync
-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObjectAsync
copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
Methods 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 Detail
-
getAsync
<V>> getAsync(int... indexes)
Loads elements by specifiedindexes
- Parameters:
indexes
- of elements- Returns:
- elements
-
addAfterAsync
> addAfterAsync(V elementToFind, V element)
Insertselement
afterelementToFind
- Parameters:
elementToFind
- - object to findelement
- - object to add- Returns:
- new list size
-
addBeforeAsync
> addBeforeAsync(V elementToFind, V element)
Insertselement
beforeelementToFind
- Parameters:
elementToFind
- - object to findelement
- - object to add- Returns:
- new list size
-
addAsync
> addAsync(int index, V element)
Insertselement
atindex
. Subsequent elements are shifted.- Parameters:
index
- - index numberelement
- - element to insert- Returns:
true
if list was changed
-
addAllAsync
> addAllAsync(int index, <? extends V> elements)
Insertselements
atindex
. Subsequent elements are shifted.- Parameters:
index
- - index numberelements
- - elements to insert- Returns:
true
if list changed orfalse
if element isn't found
-
lastIndexOfAsync
> lastIndexOfAsync( element)
Returns last index ofelement
or -1 if element isn't found- Parameters:
element
- to find- Returns:
- index of -1 if element isn't found
-
indexOfAsync
> indexOfAsync( element)
Returns last index ofelement
or -1 if element isn't found- Parameters:
element
- to find- Returns:
- index of -1 if element isn't found
-
fastSetAsync
> fastSetAsync(int index, V element)
- Parameters:
index
- - index of objectelement
- - object- Returns:
- void
-
setAsync
RFuture<V> setAsync(int index, V element)
Setelement
atindex
and returns previous element.- Parameters:
index
- - index of objectelement
- - object- Returns:
- previous element or
null
if element wasn't set.
-
getAsync
RFuture<V> getAsync(int index)
Get element atindex
- Parameters:
index
- - index of object- Returns:
- element
-
readAllAsync
<V>> readAllAsync()
Read all elements at once- Returns:
- list of values
-
trimAsync
> trimAsync(int fromIndex, int toIndex)
Trim list and remains elements only in specified rangefromIndex
, inclusive, andtoIndex
, inclusive.- Parameters:
fromIndex
- - from indextoIndex
- - to index- Returns:
- void
-
fastRemoveAsync
> fastRemoveAsync(int index)
Removes element atindex
. Works faster thanremoveAsync(Object, int)
but doesn't return element.- Parameters:
index
- - index of object- Returns:
- void
-
removeAsync
RFuture<V> removeAsync(int index)
Removes element atindex
.- Parameters:
index
- - index of object- Returns:
- element or
null
if element wasn't set.
-
removeAsync
> removeAsync( element, int count)
Removes up tocount
occurrences ofelement
- Parameters:
element
- - element to findcount
- - amount occurrences- Returns:
true
if at least one element removed; orfalse
if element isn't found
-
rangeAsync
<V>> rangeAsync(int toIndex)
Returns range of values from 0 index totoIndex
. Indexes are zero based.-1
means the last element,-2
means penultimate and so on.- Parameters:
toIndex
- - end index- Returns:
- elements
-
rangeAsync
<V>> rangeAsync(int fromIndex, int toIndex)
Returns range of values fromfromIndex
totoIndex
index including. Indexes are zero based.-1
means the last element,-2
means penultimate and so on.- Parameters:
fromIndex
- - start indextoIndex
- - end index- Returns:
- elements
-
addListenerAsync
> addListenerAsync(ObjectListener listener)
Adds object event listener- Specified by:
addListenerAsync
in interfaceRObjectAsync
- Parameters:
listener
- - object event listener- Returns:
- listener id
- See Also:
ExpiredObjectListener
,DeletedObjectListener
,ListAddListener
,ListInsertListener
,ListSetListener
,ListRemoveListener
,ListTrimListener
-
-