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,SequencedCollection<V>,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
ConstructorsModifierConstructorDescriptionRedissonPriorityDeque(Codec codec, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson) protectedRedissonPriorityDeque(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson) -
Method Summary
Modifier and TypeMethodDescriptionvoidintAdds 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.intaddFirstIfExists(V... elements) Adds element at the head of existing deque.addFirstIfExistsAsync(V... elements) Adds element at the head of existing deque.voidintAdds 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.intaddLastIfExists(V... elements) Adds element at the tail of existing deque.addLastIfExistsAsync(V... elements) Adds element at the tail of existing deque.booleanClear an expire timeout or expire date for object.clearExpireAsync(String... keys) Returns stream of elements contained in this deque in reverse orderbooleanUseRExpirable.expire(Duration)insteadbooleanSets a timeout for this object.booleanSets 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.booleanexpireAt(long timestamp) UseRExpirable.expire(Instant)insteadbooleanUseRExpirable.expire(Instant)insteadexpireAtAsync(long timestamp) UseRExpirableAsync.expireAsync(Instant)insteadexpireAtAsync(Date timestamp) UseRExpirableAsync.expireAsync(Instant)insteadbooleanexpireIfGreater(Duration duration) Sets a timeout for this object only if it's greater than timeout set before.booleanexpireIfGreater(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.booleanexpireIfLess(Duration duration) Sets a timeout for this object only if it's less than timeout set before.booleanexpireIfLess(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.booleanexpireIfNotSet(Duration duration) Sets a timeout for this object only if it hasn't been set before.booleanexpireIfNotSet(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.booleanexpireIfSet(Duration duration) Sets a timeout for this object only if it has been already set.booleanexpireIfSet(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.longExpiration time of Redisson object that has a timeoutExpiration time of Redisson object that has a timeoutgetLast()Returns element at the tail of this deque ornullif 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.booleanofferFirst(V e) offerFirstAsync(V e) Adds element at the head of this deque.booleanofferLastAsync(V e) Adds element at the tail of this deque.Returns element at the head of this deque ornullif there are no elements in deque.peekLast()Returns element at the tail of this deque ornullif 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.voidAdds element at the head of this deque.longRemaining 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 tocountoccurrences ofelementRetrieves and removes the first element of deque.booleanRemoves first occurrence of elementoRetrieves and removes the last element of deque.booleanRemoves last occurrence of elementoreversed()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, wrapLockedAsyncMethods 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, trimAsyncMethods 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, unlinkAsyncMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Deque
add, addAll, contains, element, getFirst, iterator, offer, peek, poll, remove, remove, removeFirst, sizeMethods inherited from interface java.util.List
replaceAll, sort, spliteratorMethods inherited from interface org.redisson.api.RCollectionAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsyncMethods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLiveMethods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsyncMethods 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, unlinkMethods inherited from interface org.redisson.api.RObjectAsync
copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsyncMethods inherited from interface org.redisson.api.RPriorityQueue
comparator, pollLastAndOfferFirstTo, readAll, trySetComparatorMethods inherited from interface org.redisson.api.RQueue
addListener, pollMethods 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:RDequeAdds element at the head of existing deque.- Specified by:
addFirstIfExistsin interfaceRDeque<V>- Parameters:
elements- - elements to add- Returns:
- length of the list
-
addLastIfExists
Description copied from interface:RDequeAdds element at the tail of existing deque.- Specified by:
addLastIfExistsin interfaceRDeque<V>- Parameters:
elements- - elements to add- Returns:
- length of the list
-
addFirst
Description copied from interface:RDequeAdds elements at the head of deque. -
addLast
Description copied from interface:RDequeAdds elements at the tail of deque. -
addFirstAsync
Description copied from interface:RDequeAsyncAdds elements at the head of deque.- Specified by:
addFirstAsyncin interfaceRDequeAsync<V>- Parameters:
elements- - elements to add- Returns:
- length of the deque
-
addLastAsync
Description copied from interface:RDequeAsyncAdds elements at the tail of deque.- Specified by:
addLastAsyncin interfaceRDequeAsync<V>- Parameters:
elements- - elements to add- Returns:
- length of the deque
-
addFirstIfExistsAsync
Description copied from interface:RDequeAsyncAdds element at the head of existing deque.- Specified by:
addFirstIfExistsAsyncin interfaceRDequeAsync<V>- Parameters:
elements- - elements to add- Returns:
- length of the list
-
addLastIfExistsAsync
Description copied from interface:RDequeAsyncAdds element at the tail of existing deque.- Specified by:
addLastIfExistsAsyncin interfaceRDequeAsync<V>- Parameters:
elements- - elements to add- Returns:
- length of the list
-
addFirstAsync
Description copied from interface:RDequeAsyncAdds element at the head of this deque.- Specified by:
addFirstAsyncin interfaceRDequeAsync<V>- Parameters:
e- - element to add- Returns:
- void
-
addLastAsync
Description copied from interface:RDequeAsyncAdds element at the tail of this deque.- Specified by:
addLastAsyncin interfaceRDequeAsync<V>- Parameters:
e- - element to add- Returns:
- void
-
addFirst
-
addLast
-
descendingIterator
- Specified by:
descendingIteratorin interfaceDeque<V>
-
getLastAsync
Description copied from interface:RDequeAsyncReturns element at the tail of this deque ornullif there are no elements in deque.- Specified by:
getLastAsyncin interfaceRDequeAsync<V>- Returns:
- element
-
getLast
-
offerFirst
- Specified by:
offerFirstin interfaceDeque<V>
-
offerFirstAsync
Description copied from interface:RDequeAsyncAdds element at the head of this deque.- Specified by:
offerFirstAsyncin interfaceRDequeAsync<V>- Parameters:
e- - element to add- Returns:
trueif element was added to this deque otherwisefalse
-
offerLast
-
offerLastAsync
Description copied from interface:RDequeAsyncAdds element at the tail of this deque.- Specified by:
offerLastAsyncin interfaceRDequeAsync<V>- Parameters:
e- - element to add- Returns:
trueif element was added to this deque otherwisefalse
-
peekFirstAsync
Description copied from interface:RDequeAsyncReturns element at the head of this deque ornullif there are no elements in deque.- Specified by:
peekFirstAsyncin interfaceRDequeAsync<V>- Returns:
- element
-
peekFirst
-
peekLast
-
peekLastAsync
Description copied from interface:RDequeAsyncReturns element at the tail of this deque ornullif there are no elements in deque.- Specified by:
peekLastAsyncin interfaceRDequeAsync<V>- Returns:
- element
-
pollFirst
-
pollFirstAsync
Description copied from interface:RDequeAsyncRetrieves and removes element at the head of this deque. Returnsnullif there are no elements in deque.- Specified by:
pollFirstAsyncin interfaceRDequeAsync<V>- Returns:
- element
-
pollLastAsync
Description copied from interface:RDequeAsyncRetrieves and removes element at the tail of this deque. Returnsnullif there are no elements in deque.- Specified by:
pollLastAsyncin interfaceRDequeAsync<V>- Returns:
- element
-
pollLast
-
popAsync
Description copied from interface:RDequeAsyncRetrieves and removes element at the head of this deque. Returnsnullif there are no elements in deque.- Specified by:
popAsyncin interfaceRDequeAsync<V>- Returns:
- element
-
pop
-
push
-
pushAsync
Description copied from interface:RDequeAsyncAdds element at the head of this deque.- Specified by:
pushAsyncin interfaceRDequeAsync<V>- Parameters:
e- - element to add- Returns:
- void
-
removeAsync
Description copied from interface:RListAsyncRemoves up tocountoccurrences ofelement- Specified by:
removeAsyncin interfaceRListAsync<V>- Overrides:
removeAsyncin classRedissonList<V>- Parameters:
o- - element to findcount- - amount occurrences- Returns:
trueif at least one element removed; orfalseif element isn't found
-
removeFirstOccurrenceAsync
Description copied from interface:RDequeAsyncRemoves first occurrence of elemento- Specified by:
removeFirstOccurrenceAsyncin interfaceRDequeAsync<V>- Parameters:
o- - element to remove- Returns:
trueif object has been removed otherwisefalse
-
removeFirstOccurrence
- Specified by:
removeFirstOccurrencein interfaceDeque<V>
-
removeFirstAsync
Description copied from interface:RDequeAsyncRetrieves and removes the first element of deque. Returnsnullif there are no elements in deque.- Specified by:
removeFirstAsyncin interfaceRDequeAsync<V>- Returns:
- element
-
removeLastAsync
Description copied from interface:RDequeAsyncRetrieves and removes the last element of deque. Returnsnullif there are no elements in deque.- Specified by:
removeLastAsyncin interfaceRDequeAsync<V>- Returns:
- element
-
removeLast
- Specified by:
removeLastin interfaceDeque<V>- Specified by:
removeLastin interfaceList<V>- Specified by:
removeLastin interfaceSequencedCollection<V>
-
removeLastOccurrenceAsync
Description copied from interface:RDequeAsyncRemoves last occurrence of elemento- Specified by:
removeLastOccurrenceAsyncin interfaceRDequeAsync<V>- Parameters:
o- - element- Returns:
trueif object has been removed otherwisefalse
-
removeLastOccurrence
- Specified by:
removeLastOccurrencein interfaceDeque<V>
-
descendingStream
Description copied from interface:RPriorityDequeReturns stream of elements contained in this deque in reverse order- Specified by:
descendingStreamin interfaceRPriorityDeque<V>- Returns:
- stream of elements in reverse order
-
pollFirstAsync
Description copied from interface:RDequeAsyncRetrieves and removes the head elements of this queue. Elements amount limited bylimitparam.- Specified by:
pollFirstAsyncin interfaceRDequeAsync<V>- Returns:
- list of head elements
-
pollFirst
Description copied from interface:RDequeRetrieves and removes the head elements of this queue. Elements amount limited bylimitparam. -
pollLast
Description copied from interface:RDequeRetrieves and removes the tail elements of this queue. Elements amount limited bylimitparam. -
pollLastAsync
Description copied from interface:RDequeAsyncRetrieves and removes the tail elements of this queue. Elements amount limited bylimitparam.- Specified by:
pollLastAsyncin interfaceRDequeAsync<V>- Returns:
- list of tail elements
-
move
Description copied from interface:RDequeMove 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:RDequeAsyncMove 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:
moveAsyncin interfaceRDequeAsync<V>- Parameters:
args- - arguments object- Returns:
- moved element
-
reversed
-
expire
Description copied from interface:RExpirableUseRExpirable.expire(Duration)instead- Specified by:
expirein interfaceRExpirable- Parameters:
timeToLive- - timeout before object will be deletedtimeUnit- - timeout time unit- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Duration)instead- Specified by:
expireAsyncin interfaceRExpirableAsync- Parameters:
timeToLive- - timeout before object will be deletedtimeUnit- - timeout time unit- Returns:
trueif the timeout was set andfalseif not
-
expireAt
public boolean expireAt(long timestamp) Description copied from interface:RExpirableUseRExpirable.expire(Instant)instead- Specified by:
expireAtin interfaceRExpirable- Parameters:
timestamp- - expire date in milliseconds (Unix timestamp)- Returns:
trueif the timeout was set andfalseif not
-
expireAtAsync
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Instant)instead- Specified by:
expireAtAsyncin interfaceRExpirableAsync- Parameters:
timestamp- - expire date in milliseconds (Unix timestamp)- Returns:
trueif the timeout was set andfalseif not
-
expire
Description copied from interface:RExpirableSets an expiration date for this object. When expire date comes the key will automatically be deleted.- Specified by:
expirein interfaceRExpirable- Parameters:
instant- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfSet
Description copied from interface:RExpirableSets 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:
expireIfSetin interfaceRExpirable- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfSetAsync
Description copied from interface:RExpirableAsyncSets 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:
expireIfSetAsyncin interfaceRExpirableAsync- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfNotSet
Description copied from interface:RExpirableSets 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:
expireIfNotSetin interfaceRExpirable- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfNotSetAsync
Description copied from interface:RExpirableAsyncSets 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:
expireIfNotSetAsyncin interfaceRExpirableAsync- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfGreater
Description copied from interface:RExpirableSets 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:
expireIfGreaterin interfaceRExpirable- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfGreaterAsync
Description copied from interface:RExpirableAsyncSets 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:
expireIfGreaterAsyncin interfaceRExpirableAsync- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfLess
Description copied from interface:RExpirableSets 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:
expireIfLessin interfaceRExpirable- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfLessAsync
Description copied from interface:RExpirableAsyncSets 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:
expireIfLessAsyncin interfaceRExpirableAsync- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
Description copied from interface:RExpirableAsyncSet an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expireAsyncin interfaceRExpirableAsync- Parameters:
instant- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expire
Description copied from interface:RExpirableSets a timeout for this object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expirein interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
Description copied from interface:RExpirableAsyncSet a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireAt
Description copied from interface:RExpirableUseRExpirable.expire(Instant)instead- Specified by:
expireAtin interfaceRExpirable- Parameters:
timestamp- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAtAsync
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Instant)instead- Specified by:
expireAtAsyncin interfaceRExpirableAsync- Parameters:
timestamp- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfSet
Description copied from interface:RExpirableSets 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:
expireIfSetin interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfSetAsync
Description copied from interface:RExpirableAsyncSets 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:
expireIfSetAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfNotSet
Description copied from interface:RExpirableSets 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:
expireIfNotSetin interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfNotSetAsync
Description copied from interface:RExpirableAsyncSets 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:
expireIfNotSetAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfGreater
Description copied from interface:RExpirableSets 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:
expireIfGreaterin interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfGreaterAsync
Description copied from interface:RExpirableAsyncSets 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:
expireIfGreaterAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfLess
Description copied from interface:RExpirableSets 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:
expireIfLessin interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfLessAsync
Description copied from interface:RExpirableAsyncSets 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:
expireIfLessAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
clearExpire
public boolean clearExpire()Description copied from interface:RExpirableClear an expire timeout or expire date for object.- Specified by:
clearExpirein interfaceRExpirable- Returns:
trueif timeout was removedfalseif object does not exist or does not have an associated timeout
-
remainTimeToLive
public long remainTimeToLive()Description copied from interface:RExpirableRemaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLivein 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:RExpirableAsyncRemaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLiveAsyncin 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:RExpirableExpiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTimein interfaceRExpirable- Returns:
- expiration time
-
getExpireTimeAsync
Description copied from interface:RExpirableAsyncExpiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTimeAsyncin interfaceRExpirableAsync- Returns:
- expiration time
-
clearExpireAsync
-