All methods are thread-safe.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final AtomicReference | |
| pack-priv final AtomicReference | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | cancel()
Implements org. Publisher to stop sending data and clean up resources.
|
| public void | dispose()
Implements io. |
| public boolean | isDisposed()
Implements io. |
| public boolean | Returns: false if this AsyncSubscription has been cancelled/disposedthe new resource to set r)Replaces the currently held resource with the given new one without disposing the old. |
| 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 boolean | Returns: false if this AsyncSubscription has been cancelled/disposedthe new resource to set r)Sets a new resource and disposes the currently held resource. |
| public void | setSubscription(Subscription
the first and only subscription to set s)Sets the given subscription if there isn't any subscription held. |
| actual | back to summary |
|---|---|
| pack-priv final AtomicReference<Subscription> actual | |
| resource | back to summary |
|---|---|
| pack-priv final AtomicReference<Disposable> resource | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| AsyncSubscription | back to summary |
|---|---|
| public AsyncSubscription() | |
| AsyncSubscription | back to summary |
|---|---|
| public AsyncSubscription(Disposable resource) | |
| 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.
| |
| dispose | back to summary |
|---|---|
| public void dispose() Implements io. Doc from io. Dispose the resource, the operation should be idempotent.
| |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Implements io. Doc from io. Returns true if this resource has been disposed.
| |
| replaceResource | back to summary |
|---|---|
| public boolean replaceResource(Disposable r) Replaces the currently held resource with the given new one without disposing the old.
| |
| 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 | |
| setResource | back to summary |
|---|---|
| public boolean setResource(Disposable r) Sets a new resource and disposes the currently held resource.
| |
| setSubscription | back to summary |
|---|---|
| public void setSubscription(Subscription s) Sets the given subscription if there isn't any subscription held.
| |