Package org.redisson.api
Interface RListReactive<V>
-
- Type Parameters:
V
- the type of elements held in this collection
- All Superinterfaces:
RCollectionReactive<V>
,RExpirableReactive
,RObjectReactive
,RSortableReactive<List<V>>
public interface RListReactive<V> extends RCollectionReactive<V>, RSortableReactive<List<V>>
list functions- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description reactor.core.publisher.Mono<Void>
add(int index, V element)
Insertselement
atindex
.reactor.core.publisher.Mono<Integer>
addAfter(V elementToFind, V element)
Addelement
afterelementToFind
reactor.core.publisher.Mono<Boolean>
addAll(int index, Collection<? extends V> elements)
Insertselements
atindex
.reactor.core.publisher.Mono<Integer>
addBefore(V elementToFind, V element)
Addelement
beforeelementToFind
reactor.core.publisher.Flux<V>
descendingIterator()
reactor.core.publisher.Flux<V>
descendingIterator(int startIndex)
reactor.core.publisher.Mono<Void>
fastRemove(int index)
Remove object by specified indexreactor.core.publisher.Mono<Void>
fastSet(int index, V element)
Setelement
atindex
.reactor.core.publisher.Mono<V>
get(int index)
Get element atindex
reactor.core.publisher.Mono<List<V>>
get(int... indexes)
Loads elements by specifiedindexes
reactor.core.publisher.Mono<Integer>
indexOf(Object element)
Returns last index ofelement
or -1 if element isn't foundreactor.core.publisher.Flux<V>
iterator(int startIndex)
reactor.core.publisher.Mono<Integer>
lastIndexOf(Object element)
Returns last index ofelement
or -1 if element isn't foundreactor.core.publisher.Mono<List<V>>
range(int toIndex)
Returns range of values from 0 index totoIndex
.reactor.core.publisher.Mono<List<V>>
range(int fromIndex, int toIndex)
Returns range of values fromfromIndex
totoIndex
index including.reactor.core.publisher.Mono<List<V>>
readAll()
Read all elements at oncereactor.core.publisher.Mono<V>
remove(int index)
Removes element atindex
.reactor.core.publisher.Mono<V>
set(int index, V element)
Setelement
atindex
and returns previous element.reactor.core.publisher.Mono<Void>
trim(int fromIndex, int toIndex)
Trim list and remains elements only in specified rangefromIndex
, inclusive, andtoIndex
, inclusive.-
Methods inherited from interface org.redisson.api.RCollectionReactive
add, addAll, addAll, contains, containsAll, iterator, remove, removeAll, retainAll, size
-
Methods inherited from interface org.redisson.api.RExpirableReactive
clearExpire, expire, expireAt, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RObjectReactive
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.RSortableReactive
readSorted, readSorted, readSorted, readSorted, readSorted, readSorted, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo
-
-
-
-
Method Detail
-
get
reactor.core.publisher.Mono<List<V>> get(int... indexes)
Loads elements by specifiedindexes
- Parameters:
indexes
- of elements- Returns:
- elements
-
addAfter
reactor.core.publisher.Mono<Integer> addAfter(V elementToFind, V element)
Addelement
afterelementToFind
- Parameters:
elementToFind
- - object to findelement
- - object to add- Returns:
- new list size
-
addBefore
reactor.core.publisher.Mono<Integer> addBefore(V elementToFind, V element)
Addelement
beforeelementToFind
- Parameters:
elementToFind
- - object to findelement
- - object to add- Returns:
- new list size
-
descendingIterator
reactor.core.publisher.Flux<V> descendingIterator()
-
descendingIterator
reactor.core.publisher.Flux<V> descendingIterator(int startIndex)
-
iterator
reactor.core.publisher.Flux<V> iterator(int startIndex)
-
lastIndexOf
reactor.core.publisher.Mono<Integer> lastIndexOf(Object 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
-
indexOf
reactor.core.publisher.Mono<Integer> indexOf(Object 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
-
add
reactor.core.publisher.Mono<Void> add(int index, V element)
Insertselement
atindex
. Subsequent elements are shifted.- Parameters:
index
- - index numberelement
- - element to insert- Returns:
true
if list was changed
-
addAll
reactor.core.publisher.Mono<Boolean> addAll(int index, Collection<? 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
-
fastSet
reactor.core.publisher.Mono<Void> fastSet(int index, V element)
- Parameters:
index
- - index of objectelement
- - object- Returns:
- void
-
set
reactor.core.publisher.Mono<V> set(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.
-
get
reactor.core.publisher.Mono<V> get(int index)
Get element atindex
- Parameters:
index
- - index of object- Returns:
- element
-
remove
reactor.core.publisher.Mono<V> remove(int index)
Removes element atindex
.- Parameters:
index
- - index of object- Returns:
- element or
null
if element wasn't set.
-
readAll
reactor.core.publisher.Mono<List<V>> readAll()
Read all elements at once- Returns:
- list of values
-
trim
reactor.core.publisher.Mono<Void> trim(int fromIndex, int toIndex)
Trim list and remains elements only in specified rangefromIndex
, inclusive, andtoIndex
, inclusive.- Parameters:
fromIndex
- - from indextoIndex
- - to index- Returns:
- void
-
fastRemove
reactor.core.publisher.Mono<Void> fastRemove(int index)
Remove object by specified index- Parameters:
index
- - index of object- Returns:
- void
-
range
reactor.core.publisher.Mono<List<V>> range(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
-
range
reactor.core.publisher.Mono<List<V>> range(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
-
-