public final class DelayedSubscription extends java.lang.Object implements PublisherSource.Subscription
PublisherSource.Subscription
which serves as a placeholder until the "real" PublisherSource.Subscription
is available.IGNORE_CANCEL
Constructor and Description |
---|
DelayedSubscription() |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Sends a hint to the producer of the associated asynchronous execution that the consumer related to this
Cancellable is not interested in the outcome of the execution. |
void |
delayedSubscription(PublisherSource.Subscription delayedSubscription)
Set the delayed
PublisherSource.Subscription . |
void |
request(long n)
Requests
n more items from the associated PublisherSource for the associated
PublisherSource.Subscriber . |
public void delayedSubscription(PublisherSource.Subscription delayedSubscription)
PublisherSource.Subscription
. This method can only be called a single time and
subsequent calls will result in cancel()
being called on delayedSubscription
.delayedSubscription
- The delayed PublisherSource.Subscription
.public void request(long n)
PublisherSource.Subscription
n
more items from the associated PublisherSource
for the associated
PublisherSource.Subscriber
.
See Reactive Streams specifications for the rules about how and when this method will be invoked.
request
in interface PublisherSource.Subscription
n
- Number of items to request.public void cancel()
Cancellable
Cancellable
is not interested in the outcome of the execution.cancel
in interface Cancellable