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, pollFromAnyWithNameAsync, pollLastAndOfferFirstToAsync, pollLastFromAnyAsync, putAsync, takeAsync, takeLastAndOfferFirstToAsyncMethods inherited from interface org.redisson.api.RCollectionAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsyncMethods 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.RObjectAsync
copyAndReplaceAsync, copyAndReplaceAsync, copyAsync, copyAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsyncMethods 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:
trueif 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 definedtimeoutif necessary for a consumer.- Parameters:
e- the element to transfertimeout- the maximum time to waitunit- the time unit- Returns:
trueif the element was transferred andfalseotherwise
-
readAll
Returns all queue elements at once- Returns:
- elements
-