Package org.redisson.api
Interface RBlockingDequeAsync<V>
- Type Parameters:
V
- the type of elements held in this collection
- All Superinterfaces:
RBlockingQueueAsync<V>
,RCollectionAsync<V>
,RDequeAsync<V>
,RExpirableAsync
,RObjectAsync
,RQueueAsync<V>
- All Known Subinterfaces:
RBlockingDeque<V>
,RPriorityBlockingDeque<V>
- All Known Implementing Classes:
RedissonBlockingDeque
,RedissonPriorityBlockingDeque
Distributed async implementation of
BlockingDeque
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionmoveAsync
(Duration timeout, DequeMoveArgs args) pollFirstAsync
(long timeout, TimeUnit unit) Retrieves and removes value at the head of queue.pollFirstFromAnyAsync
(long timeout, TimeUnit unit, String... queueNames) Retrieves and removes first available head element of any queue in async mode, waiting up to the specified wait time if necessary for an element to become available in any of defined queues including queue own.pollLastAsync
(long timeout, TimeUnit unit) Retrieves and removes value at the tail of queue.pollLastFromAnyAsync
(long timeout, TimeUnit unit, String... queueNames) Retrieves and removes first available tail element of any queue in async mode, waiting up to the specified wait time if necessary for an element to become available in any of defined queues including queue own.putFirstAsync
(V e) Adds value to the head of queue.putLastAsync
(V e) Adds value to the tail of queue.Retrieves and removes value at the head of queue.Retrieves and removes value at the tail of queue.Methods inherited from interface org.redisson.api.RBlockingQueueAsync
drainToAsync, drainToAsync, pollAsync, pollFirstFromAnyAsync, pollFromAnyAsync, pollFromAnyWithNameAsync, pollLastAndOfferFirstToAsync, pollLastFromAnyAsync, putAsync, takeAsync, takeLastAndOfferFirstToAsync
Methods inherited from interface org.redisson.api.RCollectionAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsync
Methods inherited from interface org.redisson.api.RDequeAsync
addFirstAsync, addFirstAsync, addFirstIfExistsAsync, addLastAsync, addLastAsync, addLastIfExistsAsync, getLastAsync, moveAsync, offerFirstAsync, offerLastAsync, peekFirstAsync, peekLastAsync, pollFirstAsync, pollFirstAsync, pollLastAsync, pollLastAsync, popAsync, pushAsync, removeFirstAsync, removeFirstOccurrenceAsync, removeLastAsync, removeLastOccurrenceAsync
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.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.RQueueAsync
addListenerAsync, offerAsync, peekAsync, pollAsync, pollAsync, pollLastAndOfferFirstToAsync, readAllAsync
-
Method Details
-
pollFirstFromAnyAsync
Retrieves and removes first available head element of any queue in async mode, waiting up to the specified wait time if necessary for an element to become available in any of defined queues including queue own.- Parameters:
timeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameterqueueNames
- - names of queue- Returns:
- the head of this queue, or
null
if the specified waiting time elapses before an element is available
-
pollLastFromAnyAsync
Retrieves and removes first available tail element of any queue in async mode, waiting up to the specified wait time if necessary for an element to become available in any of defined queues including queue own.- Parameters:
timeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameterqueueNames
- - names of queue- Returns:
- the head of this queue, or
null
if the specified waiting time elapses before an element is available
-
putFirstAsync
Adds value to the head of queue.- Parameters:
e
- value- Returns:
- void
-
putLastAsync
Adds value to the tail of queue.- Parameters:
e
- value- Returns:
- void
-
pollLastAsync
Retrieves and removes value at the tail of queue. If necessary waits up to definedtimeout
for an element become available.- Parameters:
timeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameter- Returns:
- the element at the head of this queue, or
null
if the specified waiting time elapses before an element is available
-
takeLastAsync
Retrieves and removes value at the tail of queue. Waits for an element become available.- Returns:
- the tail element of this queue
-
pollFirstAsync
Retrieves and removes value at the head of queue. If necessary waits up to definedtimeout
for an element become available.- Parameters:
timeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameter- Returns:
- the element at the tail of this queue, or
null
if the specified waiting time elapses before an element is available
-
takeFirstAsync
Retrieves and removes value at the head of queue. Waits for an element become available.- Returns:
- the head element of this queue
-
moveAsync
-