| Modifier and Type | Field and Description |
|---|---|
| public static final EmptySubscription | INSTANCE
A singleton, stateless instance. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | cancel()
Implements org. Publisher to stop sending data and clean up resources.
|
| public void | clear()
Implements io. |
| public static void | complete(Subscriber<?>
the target subscriber s)Sets the empty subscription instance on the subscriber and then calls onComplete. |
| public static void | error(Throwable
the error to deliver to the subscriber e, Subscriber<?> the target subscriber s)Sets the empty subscription instance on the subscriber and then calls onError with the supplied error. |
| public boolean | isEmpty()
Implements io. |
| public boolean | offer(Object
the value to enqueue, not null value)Implements io. |
| public boolean | offer(Object
the first value to enqueue, not null v1, Object the second value to enqueue, not null v2)Implements io. |
| public Object | poll()
Implements io. |
| public void | request(long
the strictly positive number of elements to requests to the upstream n)PublisherImplements org. Publisher until demand is signaled via this method.
|
| public int | requestFusion(int mode)
Implements io. |
| public String | toString()
Overrides java. |
| public static EmptySubscription | |
| public static EmptySubscription[] |
| INSTANCE | back to summary |
|---|---|
| public static final EmptySubscription INSTANCE A singleton, stateless instance. | |
| EmptySubscription | back to summary |
|---|---|
| private EmptySubscription() | |
| cancel | back to summary |
|---|---|
| public void cancel() Implements org. Doc from org. Request the Data may still be sent to meet previously signalled demand after calling cancel.
| |
| clear | back to summary |
|---|---|
| public void clear() Implements io. Doc from io. Removes all enqueued items from this queue.
| |
| complete | back to summary |
|---|---|
| public static void complete(Subscriber<?> s) Sets the empty subscription instance on the subscriber and then calls onComplete. Make sure this is only called if the subscriber hasn't received a subscription already (there is no way of telling this).
| |
| error | back to summary |
|---|---|
| public static void error(Throwable e, Subscriber<?> s) Sets the empty subscription instance on the subscriber and then calls onError with the supplied error. Make sure this is only called if the subscriber hasn't received a subscription already (there is no way of telling this).
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements io. Doc from io. Returns true if the queue is empty.
Note however that due to potential fused functions in
| |
| offer | back to summary |
|---|---|
| public boolean offer(Object value) Implements io. Doc from io. Atomically enqueue a single. | |
| offer | back to summary |
|---|---|
| public boolean offer(Object v1, Object v2) Implements io. Doc from io. Atomically enqueue two values. | |
| poll | back to summary |
|---|---|
| public Object poll() Implements io. Doc from io. Tries to dequeue a value (non-null) or returns null if the queue is empty.
If the producer uses | |
| request | back to summary |
|---|---|
| public void request(long n) Implements org. Doc from org. No events will be sent by a
It can be called however often and whenever needed—but if the outstanding cumulative demand ever becomes Long.MAX_VALUE or more,
it may be treated by the
Whatever has been requested can be sent by the
A | |
| requestFusion | back to summary |
|---|---|
| public int requestFusion(int mode) Implements io. Doc from io. Request a fusion mode from the upstream.
This should be called before
Calling this method multiple times or after
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists. | |
| valueOf | back to summary |
|---|---|
| public static EmptySubscription valueOf(String name) | |
| values | back to summary |
|---|---|
| public static EmptySubscription[] values() | |