V - the type of elements held in this collectionpublic class RedissonSubList<V> extends RedissonList<V> implements RList<V>
Listcodec, commandExecutor, name| Modifier | Constructor and Description |
|---|---|
protected |
RedissonSubList(Codec codec,
CommandAsyncExecutor commandExecutor,
String name,
int fromIndex,
int toIndex) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
V element) |
RFuture<Boolean> |
addAllAsync(Collection<? extends V> c)
Adds all elements contained in the specified collection
|
RFuture<Boolean> |
addAllAsync(int index,
Collection<? extends V> coll)
Inserts
elements at index. |
RFuture<Boolean> |
addAsync(V e)
Adds element into this collection.
|
void |
clear() |
boolean |
clearExpire()
Clear an expire timeout or expire date for object.
|
RFuture<Boolean> |
clearExpireAsync()
Clear an expire timeout or expire date for object in async mode.
|
protected RFuture<Boolean> |
clearExpireAsync(String... keys) |
RFuture<Boolean> |
containsAllAsync(Collection<?> c)
Returns
true if this collection contains all of the elements
in the specified collection. |
boolean |
equals(Object o) |
boolean |
expire(Instant instant)
Set an expire date for object.
|
boolean |
expire(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object.
|
RFuture<Boolean> |
expireAsync(Instant instant)
Set an expire date for object.
|
RFuture<Boolean> |
expireAsync(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object in async mode.
|
protected RFuture<Boolean> |
expireAsync(long timeToLive,
TimeUnit timeUnit,
String... keys) |
boolean |
expireAt(Date timestamp)
Use
RExpirable.expire(Instant) instead |
boolean |
expireAt(long timestamp)
Use
RExpirable.expire(Instant) instead |
RFuture<Boolean> |
expireAtAsync(Date timestamp)
Use
RExpirableAsync.expireAsync(Instant) instead |
RFuture<Boolean> |
expireAtAsync(long timestamp)
Use
RExpirableAsync.expireAsync(Instant) instead |
protected RFuture<Boolean> |
expireAtAsync(long timestamp,
String... keys) |
void |
fastSet(int index,
V element)
Set
element at index. |
RFuture<Void> |
fastSetAsync(int index,
V element)
Set
element at index. |
V |
get(int index) |
RFuture<V> |
getAsync(int index)
Get element at
index |
int |
hashCode() |
<R> RFuture<R> |
indexOfAsync(Object o,
Convertor<R> convertor) |
RFuture<Integer> |
lastIndexOfAsync(Object o)
Returns last index of
element or
-1 if element isn't found |
ListIterator<V> |
listIterator() |
ListIterator<V> |
listIterator(int fromIndex) |
RFuture<List<V>> |
readAllAsync()
Read all elements at once
|
long |
remainTimeToLive()
Remaining time to live of Redisson object that has a timeout
|
RFuture<Long> |
remainTimeToLiveAsync()
Remaining time to live of Redisson object that has a timeout
|
V |
remove(int index) |
RFuture<Boolean> |
removeAllAsync(Collection<?> c)
Removes all of this collection's elements that are also contained in the
specified collection.
|
RFuture<Boolean> |
removeAsync(Object o)
Removes a single instance of the specified element from this
collection, if it is present.
|
RFuture<Boolean> |
retainAllAsync(Collection<?> c)
Retains only the elements in this collection that are contained in the
specified collection.
|
V |
set(int index,
V element) |
RFuture<V> |
setAsync(int index,
V element)
Set
element at index and returns previous element. |
RFuture<Integer> |
sizeAsync()
Returns number of elements in this collection.
|
RList<V> |
subList(int fromIndex,
int toIndex) |
String |
toString() |
void |
trim(int fromIndex,
int toIndex)
Trim list and remains elements only in specified range
fromIndex, inclusive, and toIndex, inclusive. |
RFuture<Void> |
trimAsync(int fromIndex,
int toIndex)
Trim list and remains elements only in specified range
fromIndex, inclusive, and toIndex, inclusive. |
add, addAfter, addAfterAsync, addAll, addAll, addAsync, addAsync, addBefore, addBeforeAsync, addListener, addListenerAsync, contains, containsAll, containsAsync, fastRemove, fastRemoveAsync, get, getAsync, indexOf, indexOfAsync, isEmpty, iterator, lastIndexOf, lastIndexOfAsync, mapReduce, range, range, rangeAsync, rangeAsync, readAll, readSort, readSort, readSort, readSort, readSort, readSort, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, remove, remove, removeAll, removeAsync, removeAsync, removeIf, removeListener, removeListenerAsync, retainAll, size, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, toArray, toArrayaddListener, addListenerAsync, copy, copyAsync, delete, deleteAsync, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsyncclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAfter, addBefore, addListener, fastRemove, get, mapReduce, range, range, readAll, removeadd, addAll, addAll, contains, containsAll, indexOf, isEmpty, iterator, lastIndexOf, remove, removeAll, replaceAll, retainAll, size, sort, spliterator, toArray, toArrayparallelStream, removeIf, streamclearExpire, expire, expire, expireAt, expireAt, remainTimeToLivecopy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkaddAfterAsync, addAsync, addBeforeAsync, addListenerAsync, fastRemoveAsync, getAsync, indexOfAsync, rangeAsync, rangeAsync, removeAsync, removeAsynccontainsAsyncclearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsynccopyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsyncreadSort, readSort, readSort, readSort, readSort, readSort, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, sortTo, sortTo, sortTo, sortTo, sortTo, sortToreadSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsyncprotected RedissonSubList(Codec codec, CommandAsyncExecutor commandExecutor, String name, int fromIndex, int toIndex)
public RFuture<Integer> sizeAsync()
RCollectionAsyncsizeAsync in interface RCollectionAsync<V>sizeAsync in class RedissonList<V>public RFuture<List<V>> readAllAsync()
RListAsyncreadAllAsync in interface RListAsync<V>readAllAsync in class RedissonList<V>public RFuture<Boolean> addAsync(V e)
RCollectionAsyncaddAsync in interface RCollectionAsync<V>addAsync in class RedissonList<V>e - - element to addtrue if an element was added
and false if it is already presentpublic RFuture<Boolean> removeAsync(Object o)
RCollectionAsyncremoveAsync in interface RCollectionAsync<V>removeAsync in class RedissonList<V>o - element to be removed from this collection, if presenttrue if an element was removed as a result of this callpublic RFuture<Boolean> containsAllAsync(Collection<?> c)
RCollectionAsynctrue if this collection contains all of the elements
in the specified collection.containsAllAsync in interface RCollectionAsync<V>containsAllAsync in class RedissonList<V>c - collection to be checked for containment in this collectiontrue if this collection contains all of the elements
in the specified collectionpublic RFuture<Boolean> addAllAsync(Collection<? extends V> c)
RCollectionAsyncaddAllAsync in interface RCollectionAsync<V>addAllAsync in class RedissonList<V>c - - collection of elements to addtrue if at least one element was added
and false if all elements are already presentpublic RFuture<Boolean> addAllAsync(int index, Collection<? extends V> coll)
RListAsyncelements at index.
Subsequent elements are shifted.addAllAsync in interface RListAsync<V>addAllAsync in class RedissonList<V>index - - index numbercoll - - elements to inserttrue if list changed
or false if element isn't foundpublic RFuture<Boolean> removeAllAsync(Collection<?> c)
RCollectionAsyncremoveAllAsync in interface RCollectionAsync<V>removeAllAsync in class RedissonList<V>c - collection containing elements to be removed from this collectiontrue if this collection changed as a result of the
callpublic RFuture<Boolean> retainAllAsync(Collection<?> c)
RCollectionAsyncretainAllAsync in interface RCollectionAsync<V>retainAllAsync in class RedissonList<V>c - collection containing elements to be retained in this collectiontrue if this collection changed as a result of the callpublic void clear()
clear in interface Collection<V>clear in interface List<V>clear in class RedissonList<V>public RFuture<V> getAsync(int index)
RListAsyncindexgetAsync in interface RListAsync<V>getAsync in class RedissonList<V>index - - index of objectpublic V get(int index)
public RFuture<V> setAsync(int index, V element)
RListAsyncelement at index and returns previous element.setAsync in interface RListAsync<V>setAsync in class RedissonList<V>index - - index of objectelement - - objectnull if element wasn't set.public RFuture<Void> fastSetAsync(int index, V element)
RListAsyncelement at index.
Works faster than RListAsync.setAsync(int, Object) but
doesn't return previous element.fastSetAsync in interface RListAsync<V>fastSetAsync in class RedissonList<V>index - - index of objectelement - - objectpublic void add(int index,
V element)
public V remove(int index)
public <R> RFuture<R> indexOfAsync(Object o, Convertor<R> convertor)
indexOfAsync in class RedissonList<V>public RFuture<Integer> lastIndexOfAsync(Object o)
RListAsyncelement or
-1 if element isn't foundlastIndexOfAsync in interface RListAsync<V>lastIndexOfAsync in class RedissonList<V>o - to findpublic ListIterator<V> listIterator()
listIterator in interface List<V>listIterator in class RedissonList<V>public ListIterator<V> listIterator(int fromIndex)
listIterator in interface List<V>listIterator in class RedissonList<V>public RFuture<Void> trimAsync(int fromIndex, int toIndex)
RListAsyncfromIndex, inclusive, and toIndex, inclusive.trimAsync in interface RListAsync<V>trimAsync in class RedissonList<V>fromIndex - - from indextoIndex - - to indexpublic void trim(int fromIndex,
int toIndex)
RListfromIndex, inclusive, and toIndex, inclusive.public String toString()
toString in class RedissonList<V>public boolean equals(Object o)
equals in interface Collection<V>equals in interface List<V>equals in class RedissonList<V>public int hashCode()
hashCode in interface Collection<V>hashCode in interface List<V>hashCode in class RedissonList<V>public boolean expire(long timeToLive,
TimeUnit timeUnit)
RExpirableexpire in interface RExpirabletimeToLive - - timeout before object will be deletedtimeUnit - - timeout time unittrue if the timeout was set and false if notpublic RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
RExpirableAsyncexpireAsync in interface RExpirableAsynctimeToLive - - timeout before object will be deletedtimeUnit - - timeout time unittrue if the timeout was set and false if notpublic boolean expireAt(long timestamp)
RExpirableRExpirable.expire(Instant) insteadexpireAt in interface RExpirabletimestamp - - expire date in milliseconds (Unix timestamp)true if the timeout was set and false if notpublic RFuture<Boolean> expireAtAsync(long timestamp)
RExpirableAsyncRExpirableAsync.expireAsync(Instant) insteadexpireAtAsync in interface RExpirableAsynctimestamp - - expire date in milliseconds (Unix timestamp)true if the timeout was set and false if notpublic boolean expire(Instant instant)
RExpirableexpire in interface RExpirableinstant - - expire datetrue if the timeout was set and false if notpublic RFuture<Boolean> expireAsync(Instant instant)
RExpirableAsyncexpireAsync in interface RExpirableAsyncinstant - - expire datetrue if the timeout was set and false if notpublic boolean expireAt(Date timestamp)
RExpirableRExpirable.expire(Instant) insteadexpireAt in interface RExpirabletimestamp - - expire datetrue if the timeout was set and false if notpublic RFuture<Boolean> expireAtAsync(Date timestamp)
RExpirableAsyncRExpirableAsync.expireAsync(Instant) insteadexpireAtAsync in interface RExpirableAsynctimestamp - - expire datetrue if the timeout was set and false if notpublic boolean clearExpire()
RExpirableclearExpire in interface RExpirabletrue if timeout was removed
false if object does not exist or does not have an associated timeoutpublic RFuture<Boolean> clearExpireAsync()
RExpirableAsyncclearExpireAsync in interface RExpirableAsynctrue if the timeout was cleared and false if notpublic long remainTimeToLive()
RExpirableremainTimeToLive in interface RExpirablepublic RFuture<Long> remainTimeToLiveAsync()
RExpirableAsyncremainTimeToLiveAsync in interface RExpirableAsyncprotected RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit, String... keys)
Copyright © 2014–2021 Redisson. All rights reserved.