Class BooleanSubscription
- java.lang.Object
-
- java.util.concurrent.atomic.AtomicBoolean
-
- io.reactivex.rxjava3.internal.subscriptions.BooleanSubscription
-
- All Implemented Interfaces:
java.io.Serializable
,org.reactivestreams.Subscription
public final class BooleanSubscription extends java.util.concurrent.atomic.AtomicBoolean implements org.reactivestreams.Subscription
Subscription implementation that ignores request but remembers the cancellation which can be checked via isCancelled.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description BooleanSubscription()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
boolean
isCancelled()
Returns true if this BooleanSubscription has been cancelled.void
request(long n)
java.lang.String
toString()
-
Methods inherited from class java.util.concurrent.atomic.AtomicBoolean
compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndSet, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
request
public void request(long n)
- Specified by:
request
in interfaceorg.reactivestreams.Subscription
-
cancel
public void cancel()
- Specified by:
cancel
in interfaceorg.reactivestreams.Subscription
-
isCancelled
public boolean isCancelled()
Returns true if this BooleanSubscription has been cancelled.- Returns:
- true if this BooleanSubscription has been cancelled
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.util.concurrent.atomic.AtomicBoolean
-
-