V - the type of elements held in this collectionpublic class RedissonSubList<V> extends RedissonList<V> implements RList<V>
Listcodec, commandExecutor| 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) |
RFuture<Boolean> |
addAllAsync(int index,
Collection<? extends V> coll) |
RFuture<Boolean> |
addAsync(V e) |
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.
|
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(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object.
|
RFuture<Boolean> |
expireAsync(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object in async mode.
|
boolean |
expireAt(Date timestamp)
Set an expire date for object.
|
boolean |
expireAt(long timestamp)
Set an expire date for object.
|
RFuture<Boolean> |
expireAtAsync(Date timestamp)
Set an expire date for object in async mode.
|
RFuture<Boolean> |
expireAtAsync(long timestamp)
Set an expire date for object in async mode.
|
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) |
int |
hashCode() |
<R> RFuture<R> |
indexOfAsync(Object o,
Convertor<R> convertor) |
RFuture<Integer> |
lastIndexOfAsync(Object o) |
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 (optional operation).
|
RFuture<Boolean> |
removeAsync(Object o)
Removes a single instance of the specified element from this
collection, if it is present (optional operation).
|
RFuture<Boolean> |
retainAllAsync(Collection<?> c)
Retains only the elements in this collection that are contained in the
specified collection (optional operation).
|
V |
set(int index,
V element) |
RFuture<V> |
setAsync(int index,
V element) |
RFuture<Integer> |
sizeAsync()
Returns the 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, addBefore, addBeforeAsync, contains, containsAll, containsAsync, fastRemove, fastRemoveAsync, get, getAsync, indexOf, indexOfAsync, isEmpty, iterator, lastIndexOf, lastIndexOfAsync, mapReduce, readAll, readSort, readSort, readSort, readSort, readSort, readSort, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, remove, remove, remove, removeAll, removeAsync, removeAsync, retainAll, size, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, toArray, toArrayawait, copy, copyAsync, delete, deleteAsync, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getName, getName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, rename, renameAsync, renamenx, renamenxAsync, suffixName, toSeconds, touch, touchAsync, unlink, unlinkAsyncclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAfter, addBefore, fastRemove, get, mapReduce, readAlladd, addAll, addAll, contains, containsAll, indexOf, isEmpty, iterator, lastIndexOf, remove, removeAll, replaceAll, retainAll, size, sort, spliterator, toArray, toArrayparallelStream, removeIf, streamclearExpire, expire, expireAt, expireAt, remainTimeToLivecopy, delete, getCodec, getName, isExists, migrate, move, rename, renamenx, touch, unlinkaddAfterAsync, addBeforeAsync, fastRemoveAsync, getAsync, indexOfAsync, removeAsynccontainsAsyncclearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsynccopyAsync, deleteAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, touchAsync, unlinkAsyncreadSort, readSort, readSort, readSort, readSort, readSort, sortTo, sortTo, sortTo, sortTo, sortTo, sortToreadSortAsync, 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)
addAsync in interface RCollectionAsync<V>addAsync in class RedissonList<V>public RFuture<Boolean> removeAsync(Object o)
RCollectionAsyncremoveAsync in interface RCollectionAsync<V>removeAsync in class RedissonList<V>o - element to be removed from this collection, if presentpublic RFuture<Boolean> containsAllAsync(Collection<?> c)
RCollectionAsynccontainsAllAsync in interface RCollectionAsync<V>containsAllAsync in class RedissonList<V>c - collection to be checked for containment in this collectionpublic RFuture<Boolean> addAllAsync(Collection<? extends V> c)
addAllAsync in interface RCollectionAsync<V>addAllAsync in class RedissonList<V>public RFuture<Boolean> addAllAsync(int index, Collection<? extends V> coll)
addAllAsync in interface RListAsync<V>addAllAsync in class RedissonList<V>public RFuture<Boolean> removeAllAsync(Collection<?> c)
RCollectionAsyncremoveAllAsync in interface RCollectionAsync<V>removeAllAsync in class RedissonList<V>c - collection containing elements to be removed from this collectionpublic RFuture<Boolean> retainAllAsync(Collection<?> c)
RCollectionAsyncretainAllAsync in interface RCollectionAsync<V>retainAllAsync in class RedissonList<V>c - collection containing elements to be retained in this collectionpublic void clear()
clear in interface Collection<V>clear in interface List<V>clear in class RedissonList<V>public RFuture<V> getAsync(int index)
getAsync in interface RListAsync<V>getAsync in class RedissonList<V>public V get(int index)
public RFuture<V> setAsync(int index, V element)
setAsync in interface RListAsync<V>setAsync in class RedissonList<V>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)
lastIndexOfAsync in interface RListAsync<V>lastIndexOfAsync in class RedissonList<V>public 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)
RListAsynctrimAsync in interface RListAsync<V>trimAsync in class RedissonList<V>fromIndex - - from indextoIndex - - to indexpublic void trim(int fromIndex,
int toIndex)
RListpublic 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)
RExpirableexpireAt in interface RExpirabletimestamp - - expire date in milliseconds (Unix timestamp)true if the timeout was set and false if notpublic RFuture<Boolean> expireAtAsync(long timestamp)
RExpirableAsyncexpireAtAsync in interface RExpirableAsynctimestamp - - expire date in seconds (Unix timestamp)true if the timeout was set and false if notpublic boolean expireAt(Date timestamp)
RExpirableexpireAt in interface RExpirabletimestamp - - expire datetrue if the timeout was set and false if notpublic RFuture<Boolean> expireAtAsync(Date timestamp)
RExpirableAsyncexpireAtAsync 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 RExpirableAsyncCopyright © 2014–2018 The Redisson Project. All rights reserved.