public class SubscriptionArbiter extends AtomicInteger implements org.reactivestreams.Subscription
Modifier and Type | Field and Description |
---|---|
protected boolean |
unbounded |
Constructor and Description |
---|
SubscriptionArbiter(boolean cancelOnReplace) |
Modifier and Type | Method and Description |
---|---|
void |
cancel() |
boolean |
isCancelled()
Returns true if the arbiter has been cancelled.
|
boolean |
isUnbounded()
Returns true if the arbiter runs in unbounded mode.
|
void |
produced(long n) |
void |
request(long n) |
void |
setSubscription(org.reactivestreams.Subscription s)
Atomically sets a new subscription.
|
accumulateAndGet, addAndGet, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, incrementAndGet, intValue, lazySet, longValue, set, toString, updateAndGet, weakCompareAndSet
byteValue, shortValue
public final void setSubscription(org.reactivestreams.Subscription s)
s
- the subscription to set, not null (verified)public final void request(long n)
request
in interface org.reactivestreams.Subscription
public final void produced(long n)
public void cancel()
cancel
in interface org.reactivestreams.Subscription
public final boolean isUnbounded()
public final boolean isCancelled()
Copyright © 2019. All rights reserved.