V
- the type of elements held in this collectionpublic interface RBlockingQueueAsync<V> extends RQueueAsync<V>
BlockingQueue
backed by RedisModifier and Type | Method and Description |
---|---|
RFuture<Integer> |
drainToAsync(Collection<? super V> c)
Removes all available elements from this queue and adds them
to the given collection in async mode.
|
RFuture<Integer> |
drainToAsync(Collection<? super V> c,
int maxElements)
Removes at most the given number of available elements from
this queue and adds them to the given collection in async mode.
|
RFuture<V> |
pollAsync(long timeout,
TimeUnit unit)
Retrieves and removes the head of this queue in async mode, waiting up to the
specified wait time if necessary for an element to become available.
|
RFuture<V> |
pollFromAnyAsync(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> |
pollLastAndOfferFirstToAsync(String queueName,
long timeout,
TimeUnit unit) |
RFuture<Void> |
putAsync(V e)
Inserts the specified element into this queue in async mode, waiting if necessary
for space to become available.
|
RFuture<V> |
takeAsync()
Retrieves and removes the head of this queue in async mode, waiting if necessary
until an element becomes available.
|
RFuture<V> |
takeLastAndOfferFirstToAsync(String queueName) |
offerAsync, peekAsync, pollAsync, pollLastAndOfferFirstToAsync, readAllAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsync
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
deleteAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, touchAsync, unlinkAsync
RFuture<V> pollFromAnyAsync(long timeout, TimeUnit unit, String... queueNames)
queueNames
- - names of queuetimeout
- how long to wait before giving up, in units of
unit
unit
- a TimeUnit
determining how to interpret the
timeout
parameternull
if the
specified waiting time elapses before an element is availableRFuture<Integer> drainToAsync(Collection<? super V> c, int maxElements)
c
may result in elements being in neither,
either or both collections when the associated exception is
thrown. Attempts to drain a queue to itself result in
IllegalArgumentException
. Further, the behavior of
this operation is undefined if the specified collection is
modified while the operation is in progress.c
- the collection to transfer elements intomaxElements
- the maximum number of elements to transferUnsupportedOperationException
- if addition of elements
is not supported by the specified collectionClassCastException
- if the class of an element of this queue
prevents it from being added to the specified collectionNullPointerException
- if the specified collection is nullIllegalArgumentException
- if the specified collection is this
queue, or some property of an element of this queue prevents
it from being added to the specified collectionRFuture<Integer> drainToAsync(Collection<? super V> c)
c
may result in elements being in neither,
either or both collections when the associated exception is
thrown. Attempts to drain a queue to itself result in
IllegalArgumentException
. Further, the behavior of
this operation is undefined if the specified collection is
modified while the operation is in progress.c
- the collection to transfer elements intoUnsupportedOperationException
- if addition of elements
is not supported by the specified collectionClassCastException
- if the class of an element of this queue
prevents it from being added to the specified collectionNullPointerException
- if the specified collection is nullIllegalArgumentException
- if the specified collection is this
queue, or some property of an element of this queue prevents
it from being added to the specified collectionRFuture<V> pollLastAndOfferFirstToAsync(String queueName, long timeout, TimeUnit unit)
RFuture<V> pollAsync(long timeout, TimeUnit unit)
timeout
- how long to wait before giving up, in units of
unit
unit
- a TimeUnit
determining how to interpret the
timeout
parameternull
if the
specified waiting time elapses before an element is availableRFuture<V> takeAsync()
RFuture<Void> putAsync(V e)
e
- the element to addClassCastException
- if the class of the specified element
prevents it from being added to this queueNullPointerException
- if the specified element is nullIllegalArgumentException
- if some property of the specified
element prevents it from being added to this queueCopyright © 2014–2017 The Redisson Project. All rights reserved.