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.Completable
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, pollFirstFromAny, pollFromAny, pollFromAnyWithName, pollLastAndOfferFirstTo, pollLastFromAny, 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, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLive
Methods inherited from interface org.redisson.api.RObjectRx
copy, copy, copy, copyAndReplace, copyAndReplace, 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.RQueueRx
addListener, offer, peek, poll, poll, pollLastAndOfferFirstTo, readAll
-
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:
true
if 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 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
-