Package org.redisson.api
Interface RList<V>
-
- Type Parameters:
V
- the type of elements held in this collection
- All Superinterfaces:
<V>
,<V>
,<V>
,,
<V>>
,<V>>
- All Known Implementing Classes:
RedissonBlockingDeque
,RedissonBlockingQueue
,RedissonBoundedBlockingQueue
,RedissonDeque
,RedissonList
,RedissonListMultimapValues
,RedissonPriorityBlockingDeque
,RedissonPriorityBlockingQueue
,RedissonPriorityDeque
,RedissonPriorityQueue
,RedissonQueue
,RedissonRingBuffer
,RedissonSubList
public interface RList<V> extends <V>, <V>>,
Distributed and concurrent implementation of- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
addAfter(V elementToFind, V element)
Addelement
afterelementToFind
int
addBefore(V elementToFind, V element)
Addelement
beforeelementToFind
int
addListener(ObjectListener listener)
Adds object event listenervoid
fastRemove(int index)
Remove object by specified indexvoid
fastSet(int index, V element)
Setelement
atindex
.<V>
get(int... indexes)
Loads elements by specifiedindexes
<KOut,VOut>
RCollectionMapReduce<V,KOut,VOut>mapReduce()
ReturnsRMapReduce
object associated with this map<V>
range(int toIndex)
Returns range of values from 0 index totoIndex
.<V>
range(int fromIndex, int toIndex)
Returns range of values fromfromIndex
totoIndex
index including.<V>
readAll()
Read all elements at onceboolean
element, int count)
Removes up tocount
occurrences ofelement
RList<V>
subList(int fromIndex, int toIndex)
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.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
<V> get(int... indexes)
Loads elements by specifiedindexes
- Parameters:
indexes
- of elements- Returns:
- list of elements
-
mapReduce
<KOut,VOut> RCollectionMapReduce<V,KOut,VOut> mapReduce()
ReturnsRMapReduce
object associated with this map- Type Parameters:
KOut
- output keyVOut
- output value- Returns:
- MapReduce instance
-
addAfter
int addAfter(V elementToFind, V element)
Addelement
afterelementToFind
- Parameters:
elementToFind
- - object to findelement
- - object to add- Returns:
- new list size
-
addBefore
int addBefore(V elementToFind, V element)
Addelement
beforeelementToFind
- Parameters:
elementToFind
- - object to findelement
- - object to add- Returns:
- new list size
-
fastSet
void fastSet(int index, V element)
Setelement
atindex
. Works faster than but doesn't return previous element.- Parameters:
index
- - index of objectelement
- - object to set
-
readAll
<V> readAll()
Read all elements at once- Returns:
- list of values
-
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
<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
<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
-
fastRemove
void fastRemove(int index)
Remove object by specified index- Parameters:
index
- - index of object
-
remove
boolean remove( 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
-
addListener
int addListener(ObjectListener listener)
Adds object event listener- Specified by:
addListener
in interfaceRObject
- Parameters:
listener
- - object event listener- Returns:
- listener id
- See Also:
ExpiredObjectListener
,DeletedObjectListener
,ListAddListener
,ListInsertListener
,ListSetListener
,ListRemoveListener
,ListTrimListener
-
-