Package org.redisson.api
Interface RList<V>
-
- Type Parameters:
V- the type of elements held in this collection
- All Superinterfaces:
Collection<V>,Iterable<V>,List<V>,RandomAccess,RCollectionAsync<V>,RExpirable,RExpirableAsync,RListAsync<V>,RObject,RObjectAsync,RSortable<List<V>>,RSortableAsync<List<V>>
- All Known Implementing Classes:
RedissonBlockingDeque,RedissonBlockingQueue,RedissonBoundedBlockingQueue,RedissonDeque,RedissonList,RedissonListMultimapValues,RedissonPriorityBlockingDeque,RedissonPriorityBlockingQueue,RedissonPriorityDeque,RedissonPriorityQueue,RedissonQueue,RedissonRingBuffer,RedissonSubList
public interface RList<V> extends List<V>, RExpirable, RListAsync<V>, RSortable<List<V>>, RandomAccess
Distributed and concurrent implementation ofList- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intaddAfter(V elementToFind, V element)AddelementafterelementToFindintaddBefore(V elementToFind, V element)AddelementbeforeelementToFindintaddListener(ObjectListener listener)Adds object event listenervoidfastRemove(int index)Remove object by specified indexvoidfastSet(int index, V element)Setelementatindex.List<V>get(int... indexes)Loads elements by specifiedindexes<KOut,VOut>
RCollectionMapReduce<V,KOut,VOut>mapReduce()ReturnsRMapReduceobject associated with this mapList<V>range(int toIndex)Returns range of values from 0 index totoIndex.List<V>range(int fromIndex, int toIndex)Returns range of values fromfromIndextotoIndexindex including.List<V>readAll()Read all elements at oncebooleanremove(Object element, int count)Removes up tocountoccurrences ofelementRList<V>subList(int fromIndex, int toIndex)voidtrim(int fromIndex, int toIndex)Trim list and remains elements only in specified rangefromIndex, inclusive, andtoIndex, inclusive.-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, toArray, toArray
-
Methods inherited from interface org.redisson.api.RCollectionAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsync
-
Methods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RListAsync
addAfterAsync, addAllAsync, addAsync, addBeforeAsync, addListenerAsync, fastRemoveAsync, fastSetAsync, getAsync, getAsync, indexOfAsync, lastIndexOfAsync, rangeAsync, rangeAsync, readAllAsync, removeAsync, removeAsync, setAsync, trimAsync
-
Methods inherited from interface org.redisson.api.RObject
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.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.RSortable
readSort, readSort, readSort, readSort, readSort, readSort, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo
-
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
-
get
List<V> get(int... indexes)
Loads elements by specifiedindexes- Parameters:
indexes- of elements- Returns:
- list of elements
-
mapReduce
<KOut,VOut> RCollectionMapReduce<V,KOut,VOut> mapReduce()
ReturnsRMapReduceobject associated with this map- Type Parameters:
KOut- output keyVOut- output value- Returns:
- MapReduce instance
-
addAfter
int addAfter(V elementToFind, V element)
AddelementafterelementToFind- Parameters:
elementToFind- - object to findelement- - object to add- Returns:
- new list size
-
addBefore
int addBefore(V elementToFind, V element)
AddelementbeforeelementToFind- Parameters:
elementToFind- - object to findelement- - object to add- Returns:
- new list size
-
fastSet
void fastSet(int index, V element)- Parameters:
index- - index of objectelement- - object to set
-
trim
void trim(int fromIndex, int toIndex)Trim list and remains elements only in specified rangefromIndex, inclusive, andtoIndex, inclusive.- Parameters:
fromIndex- - from indextoIndex- - to index
-
range
List<V> range(int toIndex)
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
-
range
List<V> range(int fromIndex, int toIndex)
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
-
fastRemove
void fastRemove(int index)
Remove object by specified index- Parameters:
index- - index of object
-
remove
boolean remove(Object element, int count)
Removes up tocountoccurrences ofelement- Parameters:
element- - element to findcount- - amount occurrences- Returns:
trueif at least one element removed; orfalseif element isn't found
-
addListener
int addListener(ObjectListener listener)
Adds object event listener- Specified by:
addListenerin interfaceRObject- Parameters:
listener- - object event listener- Returns:
- listener id
- See Also:
ExpiredObjectListener,DeletedObjectListener,ListAddListener,ListInsertListener,ListSetListener,ListRemoveListener,ListTrimListener
-
-