The onNext, onError and onCompleted methods should be called in a sequential manner, just like the Observer's methods. The other methods are thread-safe.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | Emitter.BackpressureMode
Options to handle backpressure in the emitter. |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public void | setCancellation(Cancellable
the cancellable resource, null is allowed c)Sets a Cancellable on this emitter; any previous Subscription or Cancellation will be unsubscribed/cancelled. |
| public void | setSubscription(Subscription
the subscription, null is allowed s)Sets a Subscription on this emitter; any previous Subscription or Cancellation will be unsubscribed/cancelled. |
| requested | back to summary |
|---|---|
| public long requested() The current outstanding request amount. This method it thread-safe.
| |
| setCancellation | back to summary |
|---|---|
| public void setCancellation(Cancellable c) Sets a Cancellable on this emitter; any previous Subscription or Cancellation will be unsubscribed/cancelled.
| |
| setSubscription | back to summary |
|---|---|
| public void setSubscription(Subscription s) Sets a Subscription on this emitter; any previous Subscription or Cancellation will be unsubscribed/cancelled.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final Emitter. | BUFFER
Buffers (unbounded) all onNext calls until the downstream can consume them. |
| public static final Emitter. | DROP
Drops the incoming onNext value if the downstream can't keep up. |
| public static final Emitter. | ERROR
Signals a |
| public static final Emitter. | LATEST
Keeps the latest onNext value and overwrites it with newer ones until the downstream can consume it. |
| public static final Emitter. | NONE
No backpressure is applied as the onNext calls pass through the Emitter;
note that this may cause |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Emitter. | |
| public static Emitter. |
| BUFFER | back to summary |
|---|---|
| public static final Emitter. Buffers (unbounded) all onNext calls until the downstream can consume them. | |
| DROP | back to summary |
|---|---|
| public static final Emitter. Drops the incoming onNext value if the downstream can't keep up. | |
| ERROR | back to summary |
|---|---|
| public static final Emitter. Signals a | |
| LATEST | back to summary |
|---|---|
| public static final Emitter. Keeps the latest onNext value and overwrites it with newer ones until the downstream can consume it. | |
| NONE | back to summary |
|---|---|
| public static final Emitter. No backpressure is applied as the onNext calls pass through the Emitter;
note that this may cause | |
| BackpressureMode | back to summary |
|---|---|
| private BackpressureMode() | |
| valueOf | back to summary |
|---|---|
| public static Emitter. | |
| values | back to summary |
|---|---|
| public static Emitter. | |