public class ConcurrentSubscription extends java.lang.Object implements PublisherSource.Subscription
PublisherSource.Subscriptionand guards against multiple calls of
This class exists to enforce the
Reactive Streams, 2.7
rule. It also allows a custom
Cancellable to be used in the event that there maybe multiple cancel
operations which are linked, but we still need to prevent concurrent invocation of the
|Modifier||Constructor and Description|
|Modifier and Type||Method and Description|
Sends a hint to the producer of the associated asynchronous execution that the consumer related to this
public static ConcurrentSubscription wrap(PublisherSource.Subscription subscription)
PublisherSource.Subscriptionto make it thread safe when concurrent access may exists between
subscription- The subscription to wrap.
PublisherSource.Subscriptionthat will enforce the threading constraints in a concurrent environment.
public void request(long n)
nmore items from the associated
PublisherSourcefor the associated
See Reactive Streams specifications for the rules about how and when this method will be invoked.