Package org.redisson.api
Interface RTransferQueueReactive<V>
- Type Parameters:
V
- the type of elements held in this collection
- All Superinterfaces:
RBlockingQueueReactive<V>
,RCollectionReactive<V>
,RExpirableReactive
,RObjectReactive
,RQueueReactive<V>
Reactive interface of Redis based implementation of
TransferQueue
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono
<Void> Transfers the element to waiting consumer which invokedRBlockingQueueReactive.take()
orRBlockingQueueReactive.poll(long, java.util.concurrent.TimeUnit)
method at the moment of transfer.reactor.core.publisher.Mono
<Boolean> tryTransfer
(V e) Tries to transfer the element to waiting consumer which invokedRBlockingQueueReactive.take()
orRBlockingQueueReactive.poll(long, java.util.concurrent.TimeUnit)
method at the moment of transfer.reactor.core.publisher.Mono
<Boolean> tryTransfer
(V e, long timeout, TimeUnit unit) Transfers the element to waiting consumer which invokedRBlockingQueueReactive.take()
orRBlockingQueueReactive.poll(long, java.util.concurrent.TimeUnit)
method at the moment of transfer.Methods inherited from interface org.redisson.api.RBlockingQueueReactive
drainTo, drainTo, poll, pollFirstFromAny, pollFromAny, pollFromAnyWithName, pollLastAndOfferFirstTo, pollLastFromAny, put, take, takeElements, takeLastAndOfferFirstTo
Methods inherited from interface org.redisson.api.RCollectionReactive
add, addAll, addAll, contains, containsAll, iterator, remove, removeAll, retainAll, size
Methods inherited from interface org.redisson.api.RExpirableReactive
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLive
Methods inherited from interface org.redisson.api.RObjectReactive
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
Methods inherited from interface org.redisson.api.RQueueReactive
offer, peek, poll, poll, pollLastAndOfferFirstTo, readAll
-
Method Details
-
tryTransfer
Tries to transfer the element to waiting consumer which invokedRBlockingQueueReactive.take()
orRBlockingQueueReactive.poll(long, java.util.concurrent.TimeUnit)
method at the moment of transfer.- Parameters:
e
- element to transfer- Returns:
true
if element was transferred, otherwisefalse
-
transfer
Transfers the element to waiting consumer which invokedRBlockingQueueReactive.take()
orRBlockingQueueReactive.poll(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
-
tryTransfer
Transfers the element to waiting consumer which invokedRBlockingQueueReactive.take()
orRBlockingQueueReactive.poll(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
-