Package org.redisson.api
Interface RTransferQueueRx<V>
-
- Type Parameters:
V- the type of elements held in this collection
- All Superinterfaces:
RBlockingQueueRx<V>,RCollectionRx<V>,RExpirableRx,RObjectRx,RQueueRx<V>
public interface RTransferQueueRx<V> extends RBlockingQueueRx<V>
RxJava2 interface of Redis based implementation ofTransferQueue- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.reactivex.rxjava3.core.Completabletransfer(V e)Transfers the element to waiting consumer which invokedRBlockingQueueRx.take()orRBlockingQueueRx.poll(long, java.util.concurrent.TimeUnit)method at the moment of transfer.io.reactivex.rxjava3.core.Single<Boolean>tryTransfer(V e)Tries to transfer the element to waiting consumer which invokedRBlockingQueueRx.take()orRBlockingQueueRx.poll(long, java.util.concurrent.TimeUnit)method at the moment of transfer.io.reactivex.rxjava3.core.Single<Boolean>tryTransfer(V e, long timeout, TimeUnit unit)Transfers the element to waiting consumer which invokedRBlockingQueueRx.take()orRBlockingQueueRx.poll(long, java.util.concurrent.TimeUnit)method at the moment of transfer.-
Methods inherited from interface org.redisson.api.RBlockingQueueRx
drainTo, drainTo, poll, pollFromAny, pollLastAndOfferFirstTo, put, take, takeElements, takeLastAndOfferFirstTo
-
Methods inherited from interface org.redisson.api.RCollectionRx
add, addAll, addAll, contains, containsAll, iterator, remove, removeAll, retainAll, size
-
Methods inherited from interface org.redisson.api.RExpirableRx
clearExpire, expire, expireAt, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RObjectRx
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
-
-
-
Method Detail
-
tryTransfer
io.reactivex.rxjava3.core.Single<Boolean> tryTransfer(V e)
Tries to transfer the element to waiting consumer which invokedRBlockingQueueRx.take()orRBlockingQueueRx.poll(long, java.util.concurrent.TimeUnit)method at the moment of transfer.- Parameters:
e- element to transfer- Returns:
trueif element was transferred, otherwisefalse
-
transfer
io.reactivex.rxjava3.core.Completable transfer(V e)
Transfers the element to waiting consumer which invokedRBlockingQueueRx.take()orRBlockingQueueRx.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
io.reactivex.rxjava3.core.Single<Boolean> tryTransfer(V e, long timeout, TimeUnit unit)
Transfers the element to waiting consumer which invokedRBlockingQueueRx.take()orRBlockingQueueRx.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
-
-