Class EmptySubscription
- java.lang.Object
-
- io.servicetalk.concurrent.internal.EmptySubscription
-
- All Implemented Interfaces:
Cancellable
,PublisherSource.Subscription
public final class EmptySubscription extends java.lang.Object implements PublisherSource.Subscription
APublisherSource.Subscription
implementation, which does not do anything.
-
-
Field Summary
Fields Modifier and Type Field Description static EmptySubscription
EMPTY_SUBSCRIPTION
-
Fields inherited from interface io.servicetalk.concurrent.Cancellable
IGNORE_CANCEL
-
-
Constructor Summary
Constructors Constructor Description EmptySubscription()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
Sends a hint to the producer of the associated asynchronous execution that the consumer related to thisCancellable
is not interested in the outcome of the execution.void
request(long n)
Requestsn
more items from the associatedPublisherSource
for the associatedPublisherSource.Subscriber
.
-
-
-
Field Detail
-
EMPTY_SUBSCRIPTION
public static final EmptySubscription EMPTY_SUBSCRIPTION
-
-
Method Detail
-
request
public void request(long n)
Description copied from interface:PublisherSource.Subscription
Requestsn
more items from the associatedPublisherSource
for the associatedPublisherSource.Subscriber
.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
request
in interfacePublisherSource.Subscription
- Parameters:
n
- Number of items to request.
-
cancel
public void cancel()
Description copied from interface:Cancellable
Sends a hint to the producer of the associated asynchronous execution that the consumer related to thisCancellable
is not interested in the outcome of the execution.- Specified by:
cancel
in interfaceCancellable
-
-