Package org.redisson.api
Interface RQueueReactive<V>
-
- Type Parameters:
V
- the type of elements held in this collection
- All Superinterfaces:
RCollectionReactive<V>
,RExpirableReactive
,RObjectReactive
- All Known Subinterfaces:
RBlockingDequeReactive<V>
,RBlockingQueueReactive<V>
,RDequeReactive<V>
,RRingBufferReactive<V>
,RTransferQueueReactive<V>
public interface RQueueReactive<V> extends RCollectionReactive<V>
Reactive interface for Queue object- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description reactor.core.publisher.Mono<Boolean>
offer(V e)
Inserts the specified element into this queue.reactor.core.publisher.Mono<V>
peek()
Retrieves the head of this queue in async mode.reactor.core.publisher.Mono<V>
poll()
Retrieves and removes the head of this queue in async mode.reactor.core.publisher.Mono<List<V>>
poll(int limit)
Retrieves and removes the head elements of this queue.reactor.core.publisher.Mono<V>
pollLastAndOfferFirstTo(String queueName)
Retrieves and removes last available tail element of this queue queue and adds it at the head ofqueueName
.reactor.core.publisher.Mono<List<V>>
readAll()
Returns all queue elements at once-
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
-
-
-
-
Method Detail
-
peek
reactor.core.publisher.Mono<V> peek()
Retrieves the head of this queue in async mode.- Returns:
- the head of this queue, or
null
-
poll
reactor.core.publisher.Mono<V> poll()
Retrieves and removes the head of this queue in async mode.- Returns:
- the head of this queue, or
null
-
poll
reactor.core.publisher.Mono<List<V>> poll(int limit)
Retrieves and removes the head elements of this queue. Elements amount limited bylimit
param.- Returns:
- list of head elements
-
offer
reactor.core.publisher.Mono<Boolean> offer(V e)
Inserts the specified element into this queue.- Parameters:
e
- the element to add- Returns:
true
if successful, orfalse
- Throws:
ClassCastException
- if the class of the specified element prevents it from being added to this queueNullPointerException
- if the specified element is null
-
pollLastAndOfferFirstTo
reactor.core.publisher.Mono<V> pollLastAndOfferFirstTo(String queueName)
Retrieves and removes last available tail element of this queue queue and adds it at the head ofqueueName
.- Parameters:
queueName
- - names of destination queue- Returns:
- the tail of this queue, or
null
if the specified waiting time elapses before an element is available
-
-