Package org.redisson
Class RedissonPriorityDeque<V>
java.lang.Object
org.redisson.RedissonObject
org.redisson.RedissonList<V>
org.redisson.RedissonPriorityQueue<V>
org.redisson.RedissonPriorityDeque<V>
- Type Parameters:
V
- the type of elements held in this collection
- All Implemented Interfaces:
Iterable<V>
,Collection<V>
,Deque<V>
,List<V>
,Queue<V>
,RandomAccess
,RCollectionAsync<V>
,RDeque<V>
,RDequeAsync<V>
,RExpirable
,RExpirableAsync
,RList<V>
,RListAsync<V>
,RObject
,RObjectAsync
,RPriorityDeque<V>
,RPriorityQueue<V>
,RQueue<V>
,RQueueAsync<V>
,RSortable<List<V>>
,RSortableAsync<List<V>>
- Direct Known Subclasses:
RedissonPriorityBlockingDeque
Distributed and concurrent implementation of
Queue
- Author:
- Nikita Koksharov
-
Nested Class Summary
Nested classes/interfaces inherited from class org.redisson.RedissonPriorityQueue
RedissonPriorityQueue.BinarySearchResult<V>
-
Field Summary
Fields inherited from class org.redisson.RedissonObject
codec, name
-
Constructor Summary
ModifierConstructorDescriptionRedissonPriorityDeque
(Codec codec, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson) protected
RedissonPriorityDeque
(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson) -
Method Summary
Modifier and TypeMethodDescriptionvoid
int
Adds elements at the head of deque.addFirstAsync
(V e) Adds element at the head of this deque.addFirstAsync
(V... elements) Adds elements at the head of deque.int
addFirstIfExists
(V... elements) Adds element at the head of existing deque.addFirstIfExistsAsync
(V... elements) Adds element at the head of existing deque.void
int
Adds elements at the tail of deque.addLastAsync
(V e) Adds element at the tail of this deque.addLastAsync
(V... elements) Adds elements at the tail of deque.int
addLastIfExists
(V... elements) Adds element at the tail of existing deque.addLastIfExistsAsync
(V... elements) Adds element at the tail of existing deque.boolean
Clear an expire timeout or expire date for object.clearExpireAsync
(String... keys) Returns stream of elements contained in this deque in reverse orderboolean
UseRExpirable.expire(Duration)
insteadboolean
Sets a timeout for this object.boolean
Sets an expiration date for this object.expireAsync
(long timeToLive, TimeUnit timeUnit) UseRExpirableAsync.expireAsync(Duration)
insteadexpireAsync
(Duration duration) Set a timeout for object.expireAsync
(Instant instant) Set an expire date for object.boolean
expireAt
(long timestamp) UseRExpirable.expire(Instant)
insteadboolean
UseRExpirable.expire(Instant)
insteadexpireAtAsync
(long timestamp) UseRExpirableAsync.expireAsync(Instant)
insteadexpireAtAsync
(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.expireIfGreaterAsync
(Duration duration) Sets a timeout for this object only if it's greater than timeout set before.expireIfGreaterAsync
(Instant time) Sets an expiration date for this object only if it's greater than expiration date set before.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.expireIfLessAsync
(Duration duration) Sets a timeout for this object only if it's less than timeout set before.expireIfLessAsync
(Instant time) Sets an expiration date for this object only if it's less than expiration date set before.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.expireIfNotSetAsync
(Duration duration) Sets a timeout for this object only if it hasn't been set before.expireIfNotSetAsync
(Instant time) Sets an expiration date for this object only if it hasn't been set before.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.expireIfSetAsync
(Duration duration) Sets a timeout for this object only if it has been already set.expireIfSetAsync
(Instant time) Sets an expiration date for this object only if it has been already set.long
Expiration time of Redisson object that has a timeoutExpiration time of Redisson object that has a timeoutgetLast()
Returns element at the tail of this deque ornull
if there are no elements in deque.move
(DequeMoveArgs args) Move element from this deque to the given destination deque.moveAsync
(DequeMoveArgs args) Move element from this deque to the given destination deque.boolean
offerFirst
(V e) offerFirstAsync
(V e) Adds element at the head of this deque.boolean
offerLastAsync
(V e) Adds element at the tail of this deque.Returns element at the head of this deque ornull
if there are no elements in deque.peekLast()
Returns element at the tail of this deque ornull
if there are no elements in deque.pollFirst
(int limit) Retrieves and removes the head elements of this queue.Retrieves and removes element at the head of this deque.pollFirstAsync
(int limit) Retrieves and removes the head elements of this queue.pollLast()
pollLast
(int limit) Retrieves and removes the tail elements of this queue.Retrieves and removes element at the tail of this deque.pollLastAsync
(int limit) Retrieves and removes the tail elements of this queue.pop()
popAsync()
Retrieves and removes element at the head of this deque.void
Adds element at the head of this deque.long
Remaining time to live of Redisson object that has a timeoutRemaining time to live of Redisson object that has a timeoutremoveAsync
(Object o, int count) Removes up tocount
occurrences ofelement
Retrieves and removes the first element of deque.boolean
Removes first occurrence of elemento
Retrieves and removes the last element of deque.boolean
Removes last occurrence of elemento
Methods inherited from class org.redisson.RedissonPriorityQueue
add, addAll, addAsync, binarySearch, clear, clearExpireAsync, comparator, contains, containsAll, deleteAsync, element, expireAsync, expireAtAsync, getFirst, offer, offerAsync, peek, peekAsync, poll, poll, pollAsync, pollAsync, pollLastAndOfferFirstTo, pollLastAndOfferFirstToAsync, remove, remove, removeAll, removeFirst, retainAll, toString, trySetComparator, wrapLockedAsync, wrapLockedAsync
Methods inherited from class org.redisson.RedissonList
add, addAfter, addAfterAsync, addAll, addAllAsync, addAllAsync, addAsync, addAsync, addBefore, addBeforeAsync, addListener, addListenerAsync, containsAllAsync, containsAsync, distributedIterator, distributedIterator, equals, fastRemove, fastRemoveAsync, fastSet, fastSetAsync, get, get, getAsync, getAsync, hashCode, indexOf, indexOfAsync, indexOfAsync, isEmpty, iterator, lastIndexOf, lastIndexOfAsync, lastIndexOfAsync, listIterator, listIterator, mapReduce, range, range, rangeAsync, rangeAsync, readAll, readAllAsync, 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, removeAllAsync, removeAsync, removeAsync, removeIf, removeListener, removeListenerAsync, retainAllAsync, set, setAsync, size, sizeAsync, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, subList, toArray, toArray, trim, trimAsync
Methods inherited from class org.redisson.RedissonObject
addListener, addListenerAsync, copy, copyAsync, delete, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, getServiceManager, getSubscribeService, isExists, isExistsAsync, map, migrate, migrateAsync, move, moveAsync, prefixName, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, 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.Deque
add, addAll, contains, element, getFirst, iterator, offer, peek, poll, remove, remove, removeFirst, size
Methods inherited from interface java.util.List
replaceAll, sort, spliterator
Methods inherited from interface org.redisson.api.RCollectionAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsync
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
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsync
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, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
Methods inherited from interface org.redisson.api.RPriorityQueue
comparator, pollLastAndOfferFirstTo, readAll, trySetComparator
Methods inherited from interface org.redisson.api.RQueue
addListener, poll
Methods inherited from interface org.redisson.api.RQueueAsync
addListenerAsync, offerAsync, peekAsync, pollAsync, pollAsync, pollLastAndOfferFirstToAsync, readAllAsync
-
Constructor Details
-
RedissonPriorityDeque
protected RedissonPriorityDeque(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson) -
RedissonPriorityDeque
public RedissonPriorityDeque(Codec codec, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
-
-
Method Details
-
addFirstIfExists
Description copied from interface:RDeque
Adds element at the head of existing deque.- Specified by:
addFirstIfExists
in interfaceRDeque<V>
- Parameters:
elements
- - elements to add- Returns:
- length of the list
-
addLastIfExists
Description copied from interface:RDeque
Adds element at the tail of existing deque.- Specified by:
addLastIfExists
in interfaceRDeque<V>
- Parameters:
elements
- - elements to add- Returns:
- length of the list
-
addFirst
Description copied from interface:RDeque
Adds elements at the head of deque. -
addLast
Description copied from interface:RDeque
Adds elements at the tail of deque. -
addFirstAsync
Description copied from interface:RDequeAsync
Adds elements at the head of deque.- Specified by:
addFirstAsync
in interfaceRDequeAsync<V>
- Parameters:
elements
- - elements to add- Returns:
- length of the deque
-
addLastAsync
Description copied from interface:RDequeAsync
Adds elements at the tail of deque.- Specified by:
addLastAsync
in interfaceRDequeAsync<V>
- Parameters:
elements
- - elements to add- Returns:
- length of the deque
-
addFirstIfExistsAsync
Description copied from interface:RDequeAsync
Adds element at the head of existing deque.- Specified by:
addFirstIfExistsAsync
in interfaceRDequeAsync<V>
- Parameters:
elements
- - elements to add- Returns:
- length of the list
-
addLastIfExistsAsync
Description copied from interface:RDequeAsync
Adds element at the tail of existing deque.- Specified by:
addLastIfExistsAsync
in interfaceRDequeAsync<V>
- Parameters:
elements
- - elements to add- Returns:
- length of the list
-
addFirstAsync
Description copied from interface:RDequeAsync
Adds element at the head of this deque.- Specified by:
addFirstAsync
in interfaceRDequeAsync<V>
- Parameters:
e
- - element to add- Returns:
- void
-
addLastAsync
Description copied from interface:RDequeAsync
Adds element at the tail of this deque.- Specified by:
addLastAsync
in interfaceRDequeAsync<V>
- Parameters:
e
- - element to add- Returns:
- void
-
addFirst
-
addLast
-
descendingIterator
- Specified by:
descendingIterator
in interfaceDeque<V>
-
getLastAsync
Description copied from interface:RDequeAsync
Returns element at the tail of this deque ornull
if there are no elements in deque.- Specified by:
getLastAsync
in interfaceRDequeAsync<V>
- Returns:
- element
-
getLast
-
offerFirst
- Specified by:
offerFirst
in interfaceDeque<V>
-
offerFirstAsync
Description copied from interface:RDequeAsync
Adds element at the head of this deque.- Specified by:
offerFirstAsync
in interfaceRDequeAsync<V>
- Parameters:
e
- - element to add- Returns:
true
if element was added to this deque otherwisefalse
-
offerLast
-
offerLastAsync
Description copied from interface:RDequeAsync
Adds element at the tail of this deque.- Specified by:
offerLastAsync
in interfaceRDequeAsync<V>
- Parameters:
e
- - element to add- Returns:
true
if element was added to this deque otherwisefalse
-
peekFirstAsync
Description copied from interface:RDequeAsync
Returns element at the head of this deque ornull
if there are no elements in deque.- Specified by:
peekFirstAsync
in interfaceRDequeAsync<V>
- Returns:
- element
-
peekFirst
-
peekLast
-
peekLastAsync
Description copied from interface:RDequeAsync
Returns element at the tail of this deque ornull
if there are no elements in deque.- Specified by:
peekLastAsync
in interfaceRDequeAsync<V>
- Returns:
- element
-
pollFirst
-
pollFirstAsync
Description copied from interface:RDequeAsync
Retrieves and removes element at the head of this deque. Returnsnull
if there are no elements in deque.- Specified by:
pollFirstAsync
in interfaceRDequeAsync<V>
- Returns:
- element
-
pollLastAsync
Description copied from interface:RDequeAsync
Retrieves and removes element at the tail of this deque. Returnsnull
if there are no elements in deque.- Specified by:
pollLastAsync
in interfaceRDequeAsync<V>
- Returns:
- element
-
pollLast
-
popAsync
Description copied from interface:RDequeAsync
Retrieves and removes element at the head of this deque. Returnsnull
if there are no elements in deque.- Specified by:
popAsync
in interfaceRDequeAsync<V>
- Returns:
- element
-
pop
-
push
-
pushAsync
Description copied from interface:RDequeAsync
Adds element at the head of this deque.- Specified by:
pushAsync
in interfaceRDequeAsync<V>
- Parameters:
e
- - element to add- Returns:
- void
-
removeAsync
Description copied from interface:RListAsync
Removes up tocount
occurrences ofelement
- Specified by:
removeAsync
in interfaceRListAsync<V>
- Overrides:
removeAsync
in classRedissonList<V>
- Parameters:
o
- - element to findcount
- - amount occurrences- Returns:
true
if at least one element removed; orfalse
if element isn't found
-
removeFirstOccurrenceAsync
Description copied from interface:RDequeAsync
Removes first occurrence of elemento
- Specified by:
removeFirstOccurrenceAsync
in interfaceRDequeAsync<V>
- Parameters:
o
- - element to remove- Returns:
true
if object has been removed otherwisefalse
-
removeFirstOccurrence
- Specified by:
removeFirstOccurrence
in interfaceDeque<V>
-
removeFirstAsync
Description copied from interface:RDequeAsync
Retrieves and removes the first element of deque. Returnsnull
if there are no elements in deque.- Specified by:
removeFirstAsync
in interfaceRDequeAsync<V>
- Returns:
- element
-
removeLastAsync
Description copied from interface:RDequeAsync
Retrieves and removes the last element of deque. Returnsnull
if there are no elements in deque.- Specified by:
removeLastAsync
in interfaceRDequeAsync<V>
- Returns:
- element
-
removeLast
- Specified by:
removeLast
in interfaceDeque<V>
-
removeLastOccurrenceAsync
Description copied from interface:RDequeAsync
Removes last occurrence of elemento
- Specified by:
removeLastOccurrenceAsync
in interfaceRDequeAsync<V>
- Parameters:
o
- - element- Returns:
true
if object has been removed otherwisefalse
-
removeLastOccurrence
- Specified by:
removeLastOccurrence
in interfaceDeque<V>
-
descendingStream
Description copied from interface:RPriorityDeque
Returns stream of elements contained in this deque in reverse order- Specified by:
descendingStream
in interfaceRPriorityDeque<V>
- Returns:
- stream of elements in reverse order
-
pollFirstAsync
Description copied from interface:RDequeAsync
Retrieves and removes the head elements of this queue. Elements amount limited bylimit
param.- Specified by:
pollFirstAsync
in interfaceRDequeAsync<V>
- Returns:
- list of head elements
-
pollFirst
Description copied from interface:RDeque
Retrieves and removes the head elements of this queue. Elements amount limited bylimit
param. -
pollLast
Description copied from interface:RDeque
Retrieves and removes the tail elements of this queue. Elements amount limited bylimit
param. -
pollLastAsync
Description copied from interface:RDequeAsync
Retrieves and removes the tail elements of this queue. Elements amount limited bylimit
param.- Specified by:
pollLastAsync
in interfaceRDequeAsync<V>
- Returns:
- list of tail elements
-
move
Description copied from interface:RDeque
Move element from this deque to the given destination deque. Returns moved element.Usage examples:
V element = deque.move(DequeMoveArgs.pollLast() .addFirstTo("deque2"));
V elements = deque.move(DequeMoveArgs.pollFirst() .addLastTo("deque2"));
Requires Redis 6.2.0 and higher.
-
moveAsync
Description copied from interface:RDequeAsync
Move element from this deque to the given destination deque. Returns moved element.Usage examples:
V element = deque.move(DequeMoveArgs.pollLast() .addFirstTo("deque2"));
V elements = deque.move(DequeMoveArgs.pollFirst() .addLastTo("deque2"));
Requires Redis 6.2.0 and higher.
- Specified by:
moveAsync
in interfaceRDequeAsync<V>
- Parameters:
args
- - arguments object- Returns:
- moved element
-
expire
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
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
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
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
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
Description copied from interface:RExpirableAsync
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:
expireIfSetAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSet
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
Description copied from interface:RExpirableAsync
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:
expireIfNotSetAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreater
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
Description copied from interface:RExpirableAsync
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:
expireIfGreaterAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLess
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
Description copied from interface:RExpirableAsync
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:
expireIfLessAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
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
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
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
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
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
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
Description copied from interface:RExpirableAsync
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:
expireIfSetAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSet
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
Description copied from interface:RExpirableAsync
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:
expireIfNotSetAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreater
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
Description copied from interface:RExpirableAsync
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:
expireIfGreaterAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLess
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
Description copied from interface:RExpirableAsync
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:
expireIfLessAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
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.
-
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.
-
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
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
-
clearExpireAsync
-