Subscription represents a one-to-one lifecycle of a Subscriber subscribing to a Publisher.
It can only be used once by a single Subscriber.
It is used to both signal desire for data and cancel demand (and allow resource cleanup).
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void |
| cancel | back to summary |
|---|---|
| public void cancel() Request the Data may still be sent to meet previously signalled demand after calling cancel. | |
| request | back to summary |
|---|---|
| public void request(long n) 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
| |