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>
public interface RTransferQueueReactive<V> extends RBlockingQueueReactive<V>
Reactive interface of Redis based implementation ofTransferQueue- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description reactor.core.publisher.Mono<Void>transfer(V e)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, pollFromAny, pollLastAndOfferFirstTo, 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, expireAt, expireAt, expireAt, 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 Detail
-
tryTransfer
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.- Parameters:
e- element to transfer- Returns:
trueif element was transferred, otherwisefalse
-
transfer
reactor.core.publisher.Mono<Void> transfer(V e)
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
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. 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
-
-