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) |
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, toArray
await, 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, unlinkAsync
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAfter, addBefore, fastRemove, get, mapReduce, readAll
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, getCodec, getName, isExists, migrate, move, rename, renamenx, touch, unlink
addAfterAsync, addBeforeAsync, fastRemoveAsync, getAsync, indexOfAsync, removeAsync
containsAsync
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
copyAsync, deleteAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, touchAsync, unlinkAsync
readSort, readSort, readSort, readSort, readSort, readSort, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo
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)
addAsync
in interface RCollectionAsync<V>
addAsync
in class RedissonList<V>
public 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 presentpublic RFuture<Boolean> containsAllAsync(Collection<?> c)
RCollectionAsync
containsAllAsync
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)
RCollectionAsync
removeAllAsync
in interface RCollectionAsync<V>
removeAllAsync
in class RedissonList<V>
c
- collection containing elements to be removed from this collectionpublic 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 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)
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)
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)
RListAsync
trimAsync
in interface RListAsync<V>
trimAsync
in class RedissonList<V>
fromIndex
- - from indextoIndex
- - to indexpublic void trim(int fromIndex, int toIndex)
RList
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 seconds (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–2018 The Redisson Project. All rights reserved.