| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Subscriber | |
| pack-priv static final Object | |
| pack-priv final Queue | |
| private static final long | |
| pack-priv final AtomicInteger |
| Access | Constructor and Description |
|---|---|
| public | QueuedValueProducer(Subscriber<? super T>
the target child subscriber child)Constructs an instance with the target child subscriber and an Spsc Linked (Atomic) Queue as the queue implementation. |
| public | QueuedValueProducer(Subscriber<? super T>
the target child subscriber child, Queue<Object> the queue to use queue)Constructs an instance with the target child subscriber and a custom queue implementation |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public boolean | Returns: true if the queue accepted the offer, false otherwisethe value to enqueue and attempt to drain value)Offers a value to this producer and tries to emit any queued values if the child requests allow it. |
| public void | request(long
the maximum number of items you want this Producer to produce, or n)Long.MAX_VALUE if you
want the Producer to produce items at its own paceImplements rx. |
| child | back to summary |
|---|---|
| pack-priv final Subscriber<? super T> child | |
| NULL_SENTINEL | back to summary |
|---|---|
| pack-priv static final Object NULL_SENTINEL | |
| queue | back to summary |
|---|---|
| pack-priv final Queue<Object> queue | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| wip | back to summary |
|---|---|
| pack-priv final AtomicInteger wip | |
| QueuedValueProducer | back to summary |
|---|---|
| public QueuedValueProducer(Subscriber<? super T> child) Constructs an instance with the target child subscriber and an Spsc Linked (Atomic) Queue as the queue implementation.
| |
| QueuedValueProducer | back to summary |
|---|---|
| public QueuedValueProducer(Subscriber<? super T> child, Queue<Object> queue) Constructs an instance with the target child subscriber and a custom queue implementation
| |
| drain | back to summary |
|---|---|
| private void drain() | |
| offer | back to summary |
|---|---|
| public boolean offer(T value) Offers a value to this producer and tries to emit any queued values if the child requests allow it.
| |
| request | back to summary |
|---|---|
| public void request(long n) Implements rx. Doc from rx. Request a certain maximum number of items from this Producer. This is a way of requesting backpressure.
To disable backpressure, pass
Requests are additive but if a sequence of requests totals more than request(100); request(Long.MAX_VALUE-1);
| |