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>
RxJava2 interface of Redis based implementation of
TransferQueue- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.CompletableTransfers 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, pollFirstFromAny, pollFromAny, pollLastAndOfferFirstTo, pollLastFromAny, put, take, takeElements, takeLastAndOfferFirstToMethods inherited from interface org.redisson.api.RCollectionRx
add, addAll, addAll, contains, containsAll, iterator, remove, removeAll, retainAll, sizeMethods inherited from interface org.redisson.api.RExpirableRx
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLiveMethods 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 Details
-
tryTransfer
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
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
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
-