V
- the type of elements held in this collectionpublic class RedissonSubList<V> extends RedissonList<V> implements RList<V>
List
codec, 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)
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.
|
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)
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, contains, containsAll, containsAsync, fastRemove, fastRemoveAsync, get, getAsync, indexOf, indexOfAsync, isEmpty, iterator, lastIndexOf, lastIndexOfAsync, mapReduce, 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, retainAll, size, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, toArray, toArray
await, copy, copyAsync, delete, deleteAsync, dump, dumpAsync, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getLockByMapKey, getLockByValue, getName, getName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsync
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAfter, addBefore, fastRemove, get, mapReduce, readAll, remove
add, addAll, addAll, contains, containsAll, indexOf, isEmpty, iterator, lastIndexOf, remove, removeAll, replaceAll, retainAll, size, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
clearExpire, expire, expireAt, expireAt, remainTimeToLive
copy, delete, dump, getCodec, getName, isExists, migrate, move, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
addAfterAsync, addAsync, addBeforeAsync, fastRemoveAsync, getAsync, indexOfAsync, removeAsync, removeAsync
containsAsync
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
copyAsync, deleteAsync, dumpAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
readSort, readSort, readSort, readSort, readSort, readSort, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo
readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync
protected RedissonSubList(Codec codec, CommandAsyncExecutor commandExecutor, String name, int fromIndex, int toIndex)
public RFuture<Integer> sizeAsync()
RCollectionAsync
sizeAsync
in interface RCollectionAsync<V>
sizeAsync
in class RedissonList<V>
public RFuture<List<V>> readAllAsync()
RListAsync
readAllAsync
in interface RListAsync<V>
readAllAsync
in class RedissonList<V>
public RFuture<Boolean> addAsync(V e)
RCollectionAsync
addAsync
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)
RCollectionAsync
removeAsync
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)
RCollectionAsync
true
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)
RCollectionAsync
addAllAsync
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)
RListAsync
elements
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)
RCollectionAsync
removeAllAsync
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)
RCollectionAsync
retainAllAsync
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)
RListAsync
index
getAsync
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)
RListAsync
element
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)
RListAsync
element
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)
RListAsync
element
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)
RListAsync
fromIndex
, 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)
RList
fromIndex
, 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)
RExpirable
expire
in interface RExpirable
timeToLive
- - 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)
RExpirableAsync
expireAsync
in interface RExpirableAsync
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unittrue
if the timeout was set and false
if notpublic boolean expireAt(long timestamp)
RExpirable
expireAt
in interface RExpirable
timestamp
- - expire date in milliseconds (Unix timestamp)true
if the timeout was set and false
if notpublic RFuture<Boolean> expireAtAsync(long timestamp)
RExpirableAsync
expireAtAsync
in interface RExpirableAsync
timestamp
- - expire date in milliseconds (Unix timestamp)true
if the timeout was set and false
if notpublic boolean expireAt(Date timestamp)
RExpirable
expireAt
in interface RExpirable
timestamp
- - expire datetrue
if the timeout was set and false
if notpublic RFuture<Boolean> expireAtAsync(Date timestamp)
RExpirableAsync
expireAtAsync
in interface RExpirableAsync
timestamp
- - expire datetrue
if the timeout was set and false
if notpublic boolean clearExpire()
RExpirable
clearExpire
in interface RExpirable
true
if timeout was removed
false
if object does not exist or does not have an associated timeoutpublic RFuture<Boolean> clearExpireAsync()
RExpirableAsync
clearExpireAsync
in interface RExpirableAsync
true
if the timeout was cleared and false
if notpublic long remainTimeToLive()
RExpirable
remainTimeToLive
in interface RExpirable
public RFuture<Long> remainTimeToLiveAsync()
RExpirableAsync
remainTimeToLiveAsync
in interface RExpirableAsync
Copyright © 2014–2019 The Redisson Project. All rights reserved.