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
public interface RTransferQueueAsync<V> extends RBlockingQueueAsync<V>
Async interface for Redis based implementation ofTransferQueue
- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<V>
readAll()
Returns all queue elements at onceRFuture<Void>
transferAsync(V e)
Transfers the element to waiting consumer which invokedRBlockingQueueAsync.takeAsync()
orRBlockingQueueAsync.pollAsync(long, java.util.concurrent.TimeUnit)
method at the moment of transfer.RFuture<Boolean>
tryTransferAsync(V e)
Tries to transfer the element to waiting consumer which invokedRBlockingQueueAsync.takeAsync()
orRBlockingQueueAsync.pollAsync(long, java.util.concurrent.TimeUnit)
method at the moment of transfer.RFuture<Boolean>
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, 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.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, 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 Detail
-
tryTransferAsync
RFuture<Boolean> tryTransferAsync(V e)
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
RFuture<Void> transferAsync(V e)
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
RFuture<Boolean> 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. 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
-
-