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
public interface RBlockingDequeAsync<V> extends RDequeAsync<V>, RBlockingQueueAsync<V>
Distributed async implementation ofBlockingDeque
- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RFuture<V>
pollFirstAsync(long timeout, TimeUnit unit)
Retrieves and removes value at the head of queue.RFuture<V>
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.RFuture<V>
pollLastAsync(long timeout, TimeUnit unit)
Retrieves and removes value at the tail of queue.RFuture<V>
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.RFuture<Void>
putFirstAsync(V e)
Adds value to the head of queue.RFuture<Void>
putLastAsync(V e)
Adds value to the tail of queue.RFuture<V>
takeFirstAsync()
Retrieves and removes value at the head of queue.RFuture<V>
takeLastAsync()
Retrieves and removes value at the tail of queue.-
Methods inherited from interface org.redisson.api.RBlockingQueueAsync
drainToAsync, drainToAsync, pollAsync, pollFromAnyAsync, pollLastAndOfferFirstToAsync, 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, addLastAsync, getLastAsync, offerFirstAsync, offerLastAsync, peekFirstAsync, peekLastAsync, pollFirstAsync, pollLastAsync, popAsync, pushAsync, removeFirstAsync, removeFirstOccurrenceAsync, removeLastAsync, removeLastOccurrenceAsync
-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObjectAsync
copyAsync, deleteAsync, dumpAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
Methods inherited from interface org.redisson.api.RQueueAsync
offerAsync, peekAsync, pollAsync, pollLastAndOfferFirstToAsync, readAllAsync
-
-
-
-
Method Detail
-
pollFirstFromAnyAsync
RFuture<V> 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.- Parameters:
queueNames
- - names of queuetimeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameter- Returns:
- the head of this queue, or
null
if the specified waiting time elapses before an element is available
-
pollLastFromAnyAsync
RFuture<V> 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.- Parameters:
queueNames
- - names of queuetimeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameter- Returns:
- the head of this queue, or
null
if the specified waiting time elapses before an element is available
-
putFirstAsync
RFuture<Void> putFirstAsync(V e)
Adds value to the head of queue.- Parameters:
e
- value- Returns:
- void
-
putLastAsync
RFuture<Void> putLastAsync(V e)
Adds value to the tail of queue.- Parameters:
e
- value- Returns:
- void
-
pollLastAsync
RFuture<V> pollLastAsync(long timeout, TimeUnit unit)
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
RFuture<V> takeLastAsync()
Retrieves and removes value at the tail of queue. Waits for an element become available.- Returns:
- the tail element of this queue
-
pollFirstAsync
RFuture<V> pollFirstAsync(long timeout, TimeUnit unit)
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
-
-