Package org.redisson.api
Interface RTransferQueueAsync<V>
- All Superinterfaces:
RBlockingQueueAsync<V>
,RCollectionAsync<V>
,RExpirableAsync
,RObjectAsync
,RQueueAsync<V>
- All Known Subinterfaces:
RTransferQueue<V>
- All Known Implementing Classes:
RedissonTransferQueue
Async interface for Redis based implementation of
TransferQueue
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionreadAll()
Returns all queue elements at oncetransferAsync
(V e) Transfers the element to waiting consumer which invokedRBlockingQueueAsync.takeAsync()
orRBlockingQueueAsync.pollAsync(long, java.util.concurrent.TimeUnit)
method at the moment of transfer.Tries to transfer the element to waiting consumer which invokedRBlockingQueueAsync.takeAsync()
orRBlockingQueueAsync.pollAsync(long, java.util.concurrent.TimeUnit)
method at the moment of transfer.tryTransferAsync
(V e, long timeout, TimeUnit unit) Transfers the element to waiting consumer which invokedRBlockingQueueAsync.takeAsync()
orRBlockingQueueAsync.pollAsync(long, java.util.concurrent.TimeUnit)
method at the moment of transfer.Methods inherited from interface org.redisson.api.RBlockingQueueAsync
drainToAsync, drainToAsync, pollAsync, pollFirstFromAnyAsync, pollFromAnyAsync, 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.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
-
tryTransferAsync
Tries to transfer the element to waiting consumer which invokedRBlockingQueueAsync.takeAsync()
orRBlockingQueueAsync.pollAsync(long, java.util.concurrent.TimeUnit)
method at the moment of transfer.- Parameters:
e
- element to transfer- Returns:
true
if element was transferred, otherwisefalse
-
transferAsync
Transfers the element to waiting consumer which invokedRBlockingQueueAsync.takeAsync()
orRBlockingQueueAsync.pollAsync(long, java.util.concurrent.TimeUnit)
method at the moment of transfer. Waits if necessary for a consumer.- Parameters:
e
- the element to transfer- Throws:
ClassCastException
- 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 queue
-
tryTransferAsync
Transfers the element to waiting consumer which invokedRBlockingQueueAsync.takeAsync()
orRBlockingQueueAsync.pollAsync(long, java.util.concurrent.TimeUnit)
method at the moment of transfer. Waits up to definedtimeout
if necessary for a consumer.- Parameters:
e
- the element to transfertimeout
- the maximum time to waitunit
- the time unit- Returns:
true
if the element was transferred andfalse
otherwise
-
readAll
Returns all queue elements at once- Returns:
- elements
-