Package org.redisson
Class RedissonListMultimapValues<V>
- java.lang.Object
-
- org.redisson.RedissonObject
-
- org.redisson.RedissonListMultimapValues<V>
-
- Type Parameters:
V
- the type of elements held in this collection
- All Implemented Interfaces:
Iterable<V>
,Collection<V>
,List<V>
,RandomAccess
,RCollectionAsync<V>
,RExpirable
,RExpirableAsync
,RList<V>
,RListAsync<V>
,RObject
,RObjectAsync
,RSortable<List<V>>
,RSortableAsync<List<V>>
public class RedissonListMultimapValues<V> extends RedissonObject implements RList<V>
List based Multimap Cache values holder- Author:
- Nikita Koksharov
-
-
Field Summary
-
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name
-
-
Constructor Summary
Constructors Constructor Description RedissonListMultimapValues(Codec codec, CommandAsyncExecutor commandExecutor, String name, String timeoutSetName, Object key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, V element)
boolean
add(V e)
int
addAfter(V elementToFind, V element)
Addelement
afterelementToFind
RFuture<Integer>
addAfterAsync(V elementToFind, V element)
Insertselement
afterelementToFind
boolean
addAll(int index, Collection<? extends V> coll)
boolean
addAll(Collection<? extends V> c)
RFuture<Boolean>
addAllAsync(int index, Collection<? extends V> coll)
Insertselements
atindex
.RFuture<Boolean>
addAllAsync(Collection<? extends V> c)
Adds all elements contained in the specified collectionRFuture<Boolean>
addAsync(int index, V element)
Insertselement
atindex
.RFuture<Boolean>
addAsync(V e)
Adds element into this collection.int
addBefore(V elementToFind, V element)
Addelement
beforeelementToFind
RFuture<Integer>
addBeforeAsync(V elementToFind, V element)
Insertselement
beforeelementToFind
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)
boolean
contains(Object o)
boolean
containsAll(Collection<?> c)
RFuture<Boolean>
containsAllAsync(Collection<?> c)
Returnstrue
if this collection contains all of the elements in the specified collection.RFuture<Boolean>
containsAsync(Object o)
Returnstrue
if this collection contains encoded state of the specified element.RFuture<Boolean>
deleteAsync()
Delete object in async modeIterator<V>
distributedIterator(int count)
Returns element iterator that can be shared across multiple applications.Iterator<V>
distributedIterator(String iteratorName, int count)
Returns iterator over elements that match specified pattern.boolean
equals(Object o)
boolean
expire(long timeToLive, TimeUnit timeUnit)
UseRExpirable.expire(Duration)
insteadboolean
expire(Duration duration)
Sets a timeout for this object.boolean
expire(Instant instant)
Sets an expiration date for this object.RFuture<Boolean>
expireAsync(long timeToLive, TimeUnit timeUnit)
UseRExpirableAsync.expireAsync(Duration)
insteadprotected RFuture<Boolean>
expireAsync(long timeToLive, TimeUnit timeUnit, String param, String... keys)
RFuture<Boolean>
expireAsync(Duration duration)
Set a timeout for object.RFuture<Boolean>
expireAsync(Instant instant)
Set an expire date for object.boolean
expireAt(long timestamp)
UseRExpirable.expire(Instant)
insteadboolean
expireAt(Date timestamp)
UseRExpirable.expire(Instant)
insteadRFuture<Boolean>
expireAtAsync(long timestamp)
UseRExpirableAsync.expireAsync(Instant)
insteadprotected RFuture<Boolean>
expireAtAsync(long timestamp, String param, String... keys)
RFuture<Boolean>
expireAtAsync(Date timestamp)
UseRExpirableAsync.expireAsync(Instant)
insteadboolean
expireIfGreater(Duration duration)
Sets a timeout for this object only if it's greater than timeout set before.boolean
expireIfGreater(Instant time)
Sets an expiration date for this object only if it's greater than expiration date set before.RFuture<Boolean>
expireIfGreaterAsync(Duration duration)
RFuture<Boolean>
expireIfGreaterAsync(Instant time)
boolean
expireIfLess(Duration duration)
Sets a timeout for this object only if it's less than timeout set before.boolean
expireIfLess(Instant time)
Sets an expiration date for this object only if it's less than expiration date set before.RFuture<Boolean>
expireIfLessAsync(Duration duration)
RFuture<Boolean>
expireIfLessAsync(Instant time)
boolean
expireIfNotSet(Duration duration)
Sets a timeout for this object only if it hasn't been set before.boolean
expireIfNotSet(Instant time)
Sets an expiration date for this object only if it hasn't been set before.RFuture<Boolean>
expireIfNotSetAsync(Duration duration)
RFuture<Boolean>
expireIfNotSetAsync(Instant time)
boolean
expireIfSet(Duration duration)
Sets a timeout for this object only if it has been already set.boolean
expireIfSet(Instant time)
Sets an expiration date for this object only if it has been already set.RFuture<Boolean>
expireIfSetAsync(Duration duration)
RFuture<Boolean>
expireIfSetAsync(Instant time)
void
fastRemove(int index)
Remove object by specified indexRFuture<Void>
fastRemoveAsync(int index)
Removes element atindex
.void
fastSet(int index, V element)
Setelement
atindex
.RFuture<Void>
fastSetAsync(int index, V element)
Setelement
atindex
.V
get(int index)
List<V>
get(int... indexes)
Loads elements by specifiedindexes
RFuture<V>
getAsync(int index)
Get element atindex
RFuture<List<V>>
getAsync(int... indexes)
Loads elements by specifiedindexes
long
getExpireTime()
Expiration time of Redisson object that has a timeoutRFuture<Long>
getExpireTimeAsync()
Expiration time of Redisson object that has a timeoutint
hashCode()
int
indexOf(Object o)
RFuture<Integer>
indexOfAsync(Object o)
Returns last index ofelement
or -1 if element isn't foundboolean
isEmpty()
Iterator<V>
iterator()
int
lastIndexOf(Object o)
RFuture<Integer>
lastIndexOfAsync(Object o)
Returns last index ofelement
or -1 if element isn't foundListIterator<V>
listIterator()
ListIterator<V>
listIterator(int ind)
<KOut,VOut>
RCollectionMapReduce<V,KOut,VOut>mapReduce()
ReturnsRMapReduce
object associated with this mapList<V>
range(int toIndex)
Returns range of values from 0 index totoIndex
.List<V>
range(int fromIndex, int toIndex)
Returns range of values fromfromIndex
totoIndex
index including.RFuture<List<V>>
rangeAsync(int toIndex)
Returns range of values from 0 index totoIndex
.RFuture<List<V>>
rangeAsync(int fromIndex, int toIndex)
Returns range of values fromfromIndex
totoIndex
index including.List<V>
readAll()
Read all elements at onceRFuture<List<V>>
readAllAsync()
Read all elements at once<T> Collection<T>
readSort(String byPattern, List<String> getPatterns, SortOrder order)
Read data in sorted view<T> Collection<T>
readSort(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count)
Read data in sorted viewList<V>
readSort(String byPattern, SortOrder order)
Read data in sorted viewList<V>
readSort(String byPattern, SortOrder order, int offset, int count)
Read data in sorted viewList<V>
readSort(SortOrder order)
Read data in sorted viewList<V>
readSort(SortOrder order, int offset, int count)
Read data in sorted view<T> Collection<T>
readSortAlpha(String byPattern, List<String> getPatterns, SortOrder order)
Read data in sorted view lexicographically<T> Collection<T>
readSortAlpha(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count)
Read data in sorted view lexicographicallyList<V>
readSortAlpha(String byPattern, SortOrder order)
Read data in sorted view lexicographicallyList<V>
readSortAlpha(String byPattern, SortOrder order, int offset, int count)
Read data in sorted view lexicographicallyList<V>
readSortAlpha(SortOrder order)
Read data in sorted view lexicographicallyList<V>
readSortAlpha(SortOrder order, int offset, int count)
Read data in sorted view lexicographically<T> RFuture<Collection<T>>
readSortAlphaAsync(String byPattern, List<String> getPatterns, SortOrder order)
Read data in sorted view lexicographically<T> RFuture<Collection<T>>
readSortAlphaAsync(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count)
Read data in sorted view lexicographicallyRFuture<List<V>>
readSortAlphaAsync(String byPattern, SortOrder order)
Read data in sorted view lexicographicallyRFuture<List<V>>
readSortAlphaAsync(String byPattern, SortOrder order, int offset, int count)
Read data in sorted view lexicographicallyRFuture<List<V>>
readSortAlphaAsync(SortOrder order)
Read data in sorted view lexicographicallyRFuture<List<V>>
readSortAlphaAsync(SortOrder order, int offset, int count)
Read data in sorted view lexicographically<T> RFuture<Collection<T>>
readSortAsync(String byPattern, List<String> getPatterns, SortOrder order)
Read data in sorted view<T> RFuture<Collection<T>>
readSortAsync(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count)
Read data in sorted viewRFuture<List<V>>
readSortAsync(String byPattern, SortOrder order)
Read data in sorted viewRFuture<List<V>>
readSortAsync(String byPattern, SortOrder order, int offset, int count)
Read data in sorted viewRFuture<List<V>>
readSortAsync(SortOrder order)
Read data in sorted viewRFuture<List<V>>
readSortAsync(SortOrder order, int offset, int count)
Read data in sorted viewlong
remainTimeToLive()
Remaining time to live of Redisson object that has a timeoutRFuture<Long>
remainTimeToLiveAsync()
Remaining time to live of Redisson object that has a timeoutV
remove(int index)
boolean
remove(Object o)
boolean
remove(Object o, int count)
Removes up tocount
occurrences ofelement
boolean
removeAll(Collection<?> c)
RFuture<Boolean>
removeAllAsync(Collection<?> c)
Removes all of this collection's elements that are also contained in the specified collection.RFuture<V>
removeAsync(int index)
Removes element atindex
.RFuture<Boolean>
removeAsync(Object o)
Removes a single instance of the specified element from this collection, if it is present.RFuture<Boolean>
removeAsync(Object o, int count)
Removes up tocount
occurrences ofelement
RFuture<Void>
renameAsync(String newName)
Rename current object key tonewName
in async modeRFuture<Boolean>
renamenxAsync(String newName)
Rename current object key tonewName
in async mode only if new key is not existsboolean
retainAll(Collection<?> c)
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)
Setelement
atindex
and returns previous element.int
size()
RFuture<Integer>
sizeAsync()
Returns number of elements in this collection.RFuture<Long>
sizeInMemoryAsync()
Returns bytes amount used by object in Redis memory.int
sortTo(String destName, String byPattern, List<String> getPatterns, SortOrder order)
Sort data and store todestName
listint
sortTo(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count)
Sort data and store todestName
listint
sortTo(String destName, String byPattern, SortOrder order)
Sort data and store todestName
listint
sortTo(String destName, String byPattern, SortOrder order, int offset, int count)
Sort data and store todestName
listint
sortTo(String destName, SortOrder order)
Sort data and store todestName
listint
sortTo(String destName, SortOrder order, int offset, int count)
Sort data and store todestName
listRFuture<Integer>
sortToAsync(String destName, String byPattern, List<String> getPatterns, SortOrder order)
Sort data and store todestName
listRFuture<Integer>
sortToAsync(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count)
Sort data and store todestName
listRFuture<Integer>
sortToAsync(String destName, String byPattern, SortOrder order)
Sort data and store todestName
listRFuture<Integer>
sortToAsync(String destName, String byPattern, SortOrder order, int offset, int count)
Sort data and store todestName
listRFuture<Integer>
sortToAsync(String destName, SortOrder order)
Sort data and store todestName
listRFuture<Integer>
sortToAsync(String destName, SortOrder order, int offset, int count)
Sort data and store todestName
listRList<V>
subList(int fromIndex, int toIndex)
Object[]
toArray()
<T> T[]
toArray(T[] a)
String
toString()
void
trim(int fromIndex, int toIndex)
Trim list and remains elements only in specified rangefromIndex
, inclusive, andtoIndex
, inclusive.RFuture<Void>
trimAsync(int fromIndex, int toIndex)
Trim list and remains elements only in specified rangefromIndex
, inclusive, andtoIndex
, inclusive.-
Methods inherited from class org.redisson.RedissonObject
addListener, addListener, addListenerAsync, addListenerAsync, copy, copyAsync, delete, 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, removeListener, removeListenerAsync, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsync
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
replaceAll, sort, spliterator
-
Methods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RExpirableAsync
expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync
-
Methods inherited from interface org.redisson.api.RList
addListener
-
Methods inherited from interface org.redisson.api.RListAsync
addListenerAsync
-
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, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, touchAsync, unlinkAsync
-
-
-
-
Constructor Detail
-
RedissonListMultimapValues
public RedissonListMultimapValues(Codec codec, CommandAsyncExecutor commandExecutor, String name, String timeoutSetName, Object key)
-
-
Method Detail
-
mapReduce
public <KOut,VOut> RCollectionMapReduce<V,KOut,VOut> mapReduce()
Description copied from interface:RList
ReturnsRMapReduce
object associated with this map
-
clearExpireAsync
public RFuture<Boolean> clearExpireAsync()
Description copied from interface:RExpirableAsync
Clear an expire timeout or expire date for object in async mode. Object will not be deleted.- Specified by:
clearExpireAsync
in interfaceRExpirableAsync
- Returns:
true
if the timeout was cleared andfalse
if not
-
expireAsync
protected RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit, String param, String... keys)
-
expireAtAsync
protected RFuture<Boolean> expireAtAsync(long timestamp, String param, String... keys)
-
remainTimeToLiveAsync
public RFuture<Long> remainTimeToLiveAsync()
Description copied from interface:RExpirableAsync
Remaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLiveAsync
in interfaceRExpirableAsync
- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
renameAsync
public RFuture<Void> renameAsync(String newName)
Description copied from interface:RObjectAsync
Rename current object key tonewName
in async mode- Specified by:
renameAsync
in interfaceRObjectAsync
- Overrides:
renameAsync
in classRedissonObject
- Parameters:
newName
- - new name of object- Returns:
- void
-
renamenxAsync
public RFuture<Boolean> renamenxAsync(String newName)
Description copied from interface:RObjectAsync
Rename current object key tonewName
in async mode only if new key is not exists- Specified by:
renamenxAsync
in interfaceRObjectAsync
- Overrides:
renamenxAsync
in classRedissonObject
- Parameters:
newName
- - new name of object- Returns:
true
if object has been renamed successfully andfalse
otherwise
-
sizeInMemoryAsync
public RFuture<Long> sizeInMemoryAsync()
Description copied from interface:RObjectAsync
Returns bytes amount used by object in Redis memory.- Specified by:
sizeInMemoryAsync
in interfaceRObjectAsync
- Overrides:
sizeInMemoryAsync
in classRedissonObject
- Returns:
- size in bytes
-
deleteAsync
public RFuture<Boolean> deleteAsync()
Description copied from interface:RObjectAsync
Delete object in async mode- Specified by:
deleteAsync
in interfaceRObjectAsync
- Overrides:
deleteAsync
in classRedissonObject
- Returns:
true
if object was deletedfalse
if not
-
size
public int size()
-
sizeAsync
public RFuture<Integer> sizeAsync()
Description copied from interface:RCollectionAsync
Returns number of elements in this collection.- Specified by:
sizeAsync
in interfaceRCollectionAsync<V>
- Returns:
- size of collection
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object o)
-
toArray
public Object[] toArray()
-
readAllAsync
public RFuture<List<V>> readAllAsync()
Description copied from interface:RListAsync
Read all elements at once- Specified by:
readAllAsync
in interfaceRListAsync<V>
- Returns:
- list of values
-
toArray
public <T> T[] toArray(T[] a)
-
add
public boolean add(V e)
-
addAsync
public RFuture<Boolean> addAsync(V e)
Description copied from interface:RCollectionAsync
Adds element into this collection.- Specified by:
addAsync
in interfaceRCollectionAsync<V>
- Parameters:
e
- - element to add- Returns:
true
if an element was added andfalse
if it is already present
-
addAsync
public RFuture<Boolean> addAsync(int index, V element)
Description copied from interface:RListAsync
Insertselement
atindex
. Subsequent elements are shifted.- Specified by:
addAsync
in interfaceRListAsync<V>
- Parameters:
index
- - index numberelement
- - element to insert- Returns:
true
if list was changed
-
remove
public boolean remove(Object o)
-
removeAsync
public RFuture<Boolean> removeAsync(Object o)
Description copied from interface:RCollectionAsync
Removes a single instance of the specified element from this collection, if it is present.- Specified by:
removeAsync
in interfaceRCollectionAsync<V>
- Parameters:
o
- element to be removed from this collection, if present- Returns:
true
if an element was removed as a result of this call
-
removeAsync
public RFuture<Boolean> removeAsync(Object o, int count)
Description copied from interface:RListAsync
Removes up tocount
occurrences ofelement
- Specified by:
removeAsync
in interfaceRListAsync<V>
- Parameters:
o
- - element to findcount
- - amount occurrences- Returns:
true
if at least one element removed; orfalse
if element isn't found
-
remove
public boolean remove(Object o, int count)
Description copied from interface:RList
Removes up tocount
occurrences ofelement
-
containsAllAsync
public RFuture<Boolean> containsAllAsync(Collection<?> c)
Description copied from interface:RCollectionAsync
Returnstrue
if this collection contains all of the elements in the specified collection.- Specified by:
containsAllAsync
in interfaceRCollectionAsync<V>
- Parameters:
c
- collection to be checked for containment in this collection- Returns:
true
if this collection contains all of the elements in the specified collection
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<V>
- Specified by:
containsAll
in interfaceList<V>
-
addAll
public boolean addAll(Collection<? extends V> c)
-
addAllAsync
public RFuture<Boolean> addAllAsync(Collection<? extends V> c)
Description copied from interface:RCollectionAsync
Adds all elements contained in the specified collection- Specified by:
addAllAsync
in interfaceRCollectionAsync<V>
- Parameters:
c
- - collection of elements to add- Returns:
true
if at least one element was added andfalse
if all elements are already present
-
addAllAsync
public RFuture<Boolean> addAllAsync(int index, Collection<? extends V> coll)
Description copied from interface:RListAsync
Insertselements
atindex
. Subsequent elements are shifted.- Specified by:
addAllAsync
in interfaceRListAsync<V>
- Parameters:
index
- - index numbercoll
- - elements to insert- Returns:
true
if list changed orfalse
if element isn't found
-
addAll
public boolean addAll(int index, Collection<? extends V> coll)
-
removeAllAsync
public RFuture<Boolean> removeAllAsync(Collection<?> c)
Description copied from interface:RCollectionAsync
Removes all of this collection's elements that are also contained in the specified collection.- Specified by:
removeAllAsync
in interfaceRCollectionAsync<V>
- Parameters:
c
- collection containing elements to be removed from this collection- Returns:
true
if this collection changed as a result of the call
-
removeAll
public boolean removeAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
retainAllAsync
public RFuture<Boolean> retainAllAsync(Collection<?> c)
Description copied from interface:RCollectionAsync
Retains only the elements in this collection that are contained in the specified collection.- Specified by:
retainAllAsync
in interfaceRCollectionAsync<V>
- Parameters:
c
- collection containing elements to be retained in this collection- Returns:
true
if this collection changed as a result of the call
-
clear
public void clear()
-
get
public List<V> get(int... indexes)
Description copied from interface:RList
Loads elements by specifiedindexes
-
distributedIterator
public Iterator<V> distributedIterator(int count)
Description copied from interface:RList
Returns element iterator that can be shared across multiple applications. Creating multiple iterators on the same object with this method will result in a single shared iterator. See RList.distributedIterator(String, int) for creating different iterators.- Specified by:
distributedIterator
in interfaceRList<V>
- Parameters:
count
- batch size- Returns:
- shared elements iterator
-
distributedIterator
public Iterator<V> distributedIterator(String iteratorName, int count)
Description copied from interface:RList
Returns iterator over elements that match specified pattern. Iterator can be shared across multiple applications. Creating multiple iterators on the same object with this method will result in a single shared iterator. Iterator name must be resolved to the same hash slot as list name.- Specified by:
distributedIterator
in interfaceRList<V>
- Parameters:
iteratorName
- redis object name to which cursor will be savedcount
- batch size- Returns:
- shared elements iterator
-
getAsync
public RFuture<List<V>> getAsync(int... indexes)
Description copied from interface:RListAsync
Loads elements by specifiedindexes
- Specified by:
getAsync
in interfaceRListAsync<V>
- Parameters:
indexes
- of elements- Returns:
- elements
-
getAsync
public RFuture<V> getAsync(int index)
Description copied from interface:RListAsync
Get element atindex
- Specified by:
getAsync
in interfaceRListAsync<V>
- Parameters:
index
- - index of object- Returns:
- element
-
setAsync
public RFuture<V> setAsync(int index, V element)
Description copied from interface:RListAsync
Setelement
atindex
and returns previous element.- Specified by:
setAsync
in interfaceRListAsync<V>
- Parameters:
index
- - index of objectelement
- - object- Returns:
- previous element or
null
if element wasn't set.
-
fastSetAsync
public RFuture<Void> fastSetAsync(int index, V element)
Description copied from interface:RListAsync
Setelement
atindex
. Works faster thanRListAsync.setAsync(int, Object)
but doesn't return previous element.- Specified by:
fastSetAsync
in interfaceRListAsync<V>
- Parameters:
index
- - index of objectelement
- - object- Returns:
- void
-
removeAsync
public RFuture<V> removeAsync(int index)
Description copied from interface:RListAsync
Removes element atindex
.- Specified by:
removeAsync
in interfaceRListAsync<V>
- Parameters:
index
- - index of object- Returns:
- element or
null
if element wasn't set.
-
fastRemove
public void fastRemove(int index)
Description copied from interface:RList
Remove object by specified index- Specified by:
fastRemove
in interfaceRList<V>
- Parameters:
index
- - index of object
-
fastRemoveAsync
public RFuture<Void> fastRemoveAsync(int index)
Description copied from interface:RListAsync
Removes element atindex
. Works faster thanRListAsync.removeAsync(Object, int)
but doesn't return element.- Specified by:
fastRemoveAsync
in interfaceRListAsync<V>
- Parameters:
index
- - index of object- Returns:
- void
-
containsAsync
public RFuture<Boolean> containsAsync(Object o)
Description copied from interface:RCollectionAsync
Returnstrue
if this collection contains encoded state of the specified element.- Specified by:
containsAsync
in interfaceRCollectionAsync<V>
- Parameters:
o
- element whose presence in this collection is to be tested- Returns:
true
if this collection contains the specified element andfalse
otherwise
-
indexOfAsync
public RFuture<Integer> indexOfAsync(Object o)
Description copied from interface:RListAsync
Returns last index ofelement
or -1 if element isn't found- Specified by:
indexOfAsync
in interfaceRListAsync<V>
- Parameters:
o
- to find- Returns:
- index of -1 if element isn't found
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf
in interfaceList<V>
-
lastIndexOfAsync
public RFuture<Integer> lastIndexOfAsync(Object o)
Description copied from interface:RListAsync
Returns last index ofelement
or -1 if element isn't found- Specified by:
lastIndexOfAsync
in interfaceRListAsync<V>
- Parameters:
o
- to find- Returns:
- index of -1 if element isn't found
-
trim
public void trim(int fromIndex, int toIndex)
Description copied from interface:RList
Trim list and remains elements only in specified rangefromIndex
, inclusive, andtoIndex
, inclusive.
-
trimAsync
public RFuture<Void> trimAsync(int fromIndex, int toIndex)
Description copied from interface:RListAsync
Trim list and remains elements only in specified rangefromIndex
, inclusive, andtoIndex
, inclusive.- Specified by:
trimAsync
in interfaceRListAsync<V>
- Parameters:
fromIndex
- - from indextoIndex
- - to index- Returns:
- void
-
listIterator
public ListIterator<V> listIterator()
- Specified by:
listIterator
in interfaceList<V>
-
listIterator
public ListIterator<V> listIterator(int ind)
- Specified by:
listIterator
in interfaceList<V>
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
addAfterAsync
public RFuture<Integer> addAfterAsync(V elementToFind, V element)
Description copied from interface:RListAsync
Insertselement
afterelementToFind
- Specified by:
addAfterAsync
in interfaceRListAsync<V>
- Parameters:
elementToFind
- - object to findelement
- - object to add- Returns:
- new list size
-
addBeforeAsync
public RFuture<Integer> addBeforeAsync(V elementToFind, V element)
Description copied from interface:RListAsync
Insertselement
beforeelementToFind
- Specified by:
addBeforeAsync
in interfaceRListAsync<V>
- Parameters:
elementToFind
- - object to findelement
- - object to add- Returns:
- new list size
-
addAfter
public int addAfter(V elementToFind, V element)
Description copied from interface:RList
Addelement
afterelementToFind
-
addBefore
public int addBefore(V elementToFind, V element)
Description copied from interface:RList
Addelement
beforeelementToFind
-
readSortAsync
public RFuture<List<V>> readSortAsync(SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Parameters:
order
- for sorted data- Returns:
- sorted collection
-
readSort
public List<V> readSort(SortOrder order)
Description copied from interface:RSortable
Read data in sorted view
-
readSortAsync
public RFuture<List<V>> readSortAsync(SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Parameters:
order
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection
-
readSort
public List<V> readSort(SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view
-
readSort
public List<V> readSort(String byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view
-
readSortAsync
public RFuture<List<V>> readSortAsync(String byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection
-
readSort
public <T> Collection<T> readSort(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view- Specified by:
readSort
in interfaceRSortable<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection
-
readSortAsync
public <T> RFuture<Collection<T>> readSortAsync(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection
-
readSortAlpha
public List<V> readSortAlpha(SortOrder order)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Parameters:
order
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
public List<V> readSortAlpha(SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Parameters:
order
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
public List<V> readSortAlpha(String byPattern, SortOrder order)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
public List<V> readSortAlpha(String byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
public <T> Collection<T> readSortAlpha(String byPattern, List<String> getPatterns, SortOrder order)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
public <T> Collection<T> readSortAlpha(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public RFuture<List<V>> readSortAlphaAsync(SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Parameters:
order
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public RFuture<List<V>> readSortAlphaAsync(SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Parameters:
order
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public RFuture<List<V>> readSortAlphaAsync(String byPattern, SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public RFuture<List<V>> readSortAlphaAsync(String byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public <T> RFuture<Collection<T>> readSortAlphaAsync(String byPattern, List<String> getPatterns, SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public <T> RFuture<Collection<T>> readSortAlphaAsync(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
sortTo
public int sortTo(String destName, SortOrder order)
Description copied from interface:RSortable
Sort data and store todestName
list
-
sortToAsync
public RFuture<Integer> sortToAsync(String destName, SortOrder order)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationorder
- for sorted data- Returns:
- length of sorted data
-
readSort
public List<V> readSort(String byPattern, SortOrder order)
Description copied from interface:RSortable
Read data in sorted view
-
readSortAsync
public RFuture<List<V>> readSortAsync(String byPattern, SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted data- Returns:
- sorted collection
-
readSort
public <T> Collection<T> readSort(String byPattern, List<String> getPatterns, SortOrder order)
Description copied from interface:RSortable
Read data in sorted view
-
readSortAsync
public <T> RFuture<Collection<T>> readSortAsync(String byPattern, List<String> getPatterns, SortOrder order)
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Type Parameters:
T
- object type- Parameters:
byPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted data- Returns:
- sorted collection
-
sortTo
public int sortTo(String destName, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Sort data and store todestName
list
-
sortTo
public int sortTo(String destName, String byPattern, SortOrder order)
Description copied from interface:RSortable
Sort data and store todestName
list
-
sortToAsync
public RFuture<Integer> sortToAsync(String destName, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- length of sorted data
-
sortTo
public int sortTo(String destName, String byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Sort data and store todestName
list
-
sortToAsync
public RFuture<Integer> sortToAsync(String destName, String byPattern, SortOrder order)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortingorder
- for sorted data- Returns:
- length of sorted data
-
sortTo
public int sortTo(String destName, String byPattern, List<String> getPatterns, SortOrder order)
Description copied from interface:RSortable
Sort data and store todestName
list
-
sortToAsync
public RFuture<Integer> sortToAsync(String destName, String byPattern, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortingorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- length of sorted data
-
sortTo
public int sortTo(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortable
Sort data and store todestName
list- Specified by:
sortTo
in interfaceRSortable<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- length of sorted data
-
sortToAsync
public RFuture<Integer> sortToAsync(String destName, String byPattern, List<String> getPatterns, SortOrder order)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted data- Returns:
- length of sorted data
-
sortToAsync
public RFuture<Integer> sortToAsync(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count)
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortinggetPatterns
- that is used to load values by keys in sorted vieworder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- length of sorted data
-
rangeAsync
public RFuture<List<V>> rangeAsync(int toIndex)
Description copied from interface:RListAsync
Returns range of values from 0 index totoIndex
. Indexes are zero based.-1
means the last element,-2
means penultimate and so on.- Specified by:
rangeAsync
in interfaceRListAsync<V>
- Parameters:
toIndex
- - end index- Returns:
- elements
-
rangeAsync
public RFuture<List<V>> rangeAsync(int fromIndex, int toIndex)
Description copied from interface:RListAsync
Returns range of values fromfromIndex
totoIndex
index including. Indexes are zero based.-1
means the last element,-2
means penultimate and so on.- Specified by:
rangeAsync
in interfaceRListAsync<V>
- Parameters:
fromIndex
- - start indextoIndex
- - end index- Returns:
- elements
-
range
public List<V> range(int toIndex)
Description copied from interface:RList
Returns range of values from 0 index totoIndex
. Indexes are zero based.-1
means the last element,-2
means penultimate and so on.
-
range
public List<V> range(int fromIndex, int toIndex)
Description copied from interface:RList
Returns range of values fromfromIndex
totoIndex
index including. Indexes are zero based.-1
means the last element,-2
means penultimate and so on.
-
expire
public boolean expire(long timeToLive, TimeUnit timeUnit)
Description copied from interface:RExpirable
UseRExpirable.expire(Duration)
instead- Specified by:
expire
in interfaceRExpirable
- Parameters:
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unit- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
public RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Duration)
instead- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unit- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
public boolean expireAt(long timestamp)
Description copied from interface:RExpirable
UseRExpirable.expire(Instant)
instead- Specified by:
expireAt
in interfaceRExpirable
- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
expireAtAsync
public RFuture<Boolean> expireAtAsync(long timestamp)
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Instant)
instead- Specified by:
expireAtAsync
in interfaceRExpirableAsync
- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
expire
public boolean expire(Instant instant)
Description copied from interface:RExpirable
Sets an expiration date for this object. When expire date comes the key will automatically be deleted.- Specified by:
expire
in interfaceRExpirable
- Parameters:
instant
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSet
public boolean expireIfSet(Instant time)
Description copied from interface:RExpirable
Sets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSet
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSetAsync
public RFuture<Boolean> expireIfSetAsync(Instant time)
- Specified by:
expireIfSetAsync
in interfaceRExpirableAsync
-
expireIfNotSet
public boolean expireIfNotSet(Instant time)
Description copied from interface:RExpirable
Sets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSet
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSetAsync
public RFuture<Boolean> expireIfNotSetAsync(Instant time)
- Specified by:
expireIfNotSetAsync
in interfaceRExpirableAsync
-
expireIfGreater
public boolean expireIfGreater(Instant time)
Description copied from interface:RExpirable
Sets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreater
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreaterAsync
public RFuture<Boolean> expireIfGreaterAsync(Instant time)
- Specified by:
expireIfGreaterAsync
in interfaceRExpirableAsync
-
expireIfLess
public boolean expireIfLess(Instant time)
Description copied from interface:RExpirable
Sets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLess
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLessAsync
public RFuture<Boolean> expireIfLessAsync(Instant time)
- Specified by:
expireIfLessAsync
in interfaceRExpirableAsync
-
expireAsync
public RFuture<Boolean> expireAsync(Instant instant)
Description copied from interface:RExpirableAsync
Set an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
instant
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expire
public boolean expire(Duration duration)
Description copied from interface:RExpirable
Sets a timeout for this object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expire
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
public RFuture<Boolean> expireAsync(Duration duration)
Description copied from interface:RExpirableAsync
Set a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
public boolean expireAt(Date timestamp)
Description copied from interface:RExpirable
UseRExpirable.expire(Instant)
instead- Specified by:
expireAt
in interfaceRExpirable
- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAtAsync
public RFuture<Boolean> expireAtAsync(Date timestamp)
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Instant)
instead- Specified by:
expireAtAsync
in interfaceRExpirableAsync
- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSet
public boolean expireIfSet(Duration duration)
Description copied from interface:RExpirable
Sets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSet
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSetAsync
public RFuture<Boolean> expireIfSetAsync(Duration duration)
- Specified by:
expireIfSetAsync
in interfaceRExpirableAsync
-
expireIfNotSet
public boolean expireIfNotSet(Duration duration)
Description copied from interface:RExpirable
Sets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSet
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSetAsync
public RFuture<Boolean> expireIfNotSetAsync(Duration duration)
- Specified by:
expireIfNotSetAsync
in interfaceRExpirableAsync
-
expireIfGreater
public boolean expireIfGreater(Duration duration)
Description copied from interface:RExpirable
Sets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreater
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreaterAsync
public RFuture<Boolean> expireIfGreaterAsync(Duration duration)
- Specified by:
expireIfGreaterAsync
in interfaceRExpirableAsync
-
expireIfLess
public boolean expireIfLess(Duration duration)
Description copied from interface:RExpirable
Sets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLess
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLessAsync
public RFuture<Boolean> expireIfLessAsync(Duration duration)
- Specified by:
expireIfLessAsync
in interfaceRExpirableAsync
-
clearExpire
public boolean clearExpire()
Description copied from interface:RExpirable
Clear an expire timeout or expire date for object.- Specified by:
clearExpire
in interfaceRExpirable
- Returns:
true
if timeout was removedfalse
if object does not exist or does not have an associated timeout
-
remainTimeToLive
public long remainTimeToLive()
Description copied from interface:RExpirable
Remaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLive
in interfaceRExpirable
- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
getExpireTime
public long getExpireTime()
Description copied from interface:RExpirable
Expiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTime
in interfaceRExpirable
- Returns:
- expiration time
-
getExpireTimeAsync
public RFuture<Long> getExpireTimeAsync()
Description copied from interface:RExpirableAsync
Expiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTimeAsync
in interfaceRExpirableAsync
- Returns:
- expiration time
-
-