public static class Operators.DeferredSubscription extends Object implements Subscription, Scannable
Scannable.Attr<T>
OPERATOR_NAME_UNRELATED_WORDS_PATTERN
Constructor and Description |
---|
DeferredSubscription() |
Modifier and Type | Method and Description |
---|---|
void |
cancel() |
protected boolean |
isCancelled() |
void |
request(long n) |
Object |
scanUnsafe(Scannable.Attr key)
This method is used internally by components to define their key-value mappings
in a single place.
|
boolean |
set(Subscription s)
Atomically sets the single subscription and requests the missed amount from it.
|
protected void |
terminate() |
protected boolean isCancelled()
public void cancel()
cancel
in interface Subscription
protected void terminate()
@Nullable public Object scanUnsafe(Scannable.Attr key)
Scannable
Scannable.Attr
key,
implementors should take care to return values of the correct type, and return
null if no specific value is available.
For public consumption of attributes, prefer using Scannable.scan(Attr)
, which will
return a typed value and fall back to the key's default if the component didn't
define any mapping.
scanUnsafe
in interface Scannable
key
- a Scannable.Attr
to resolve for the component.public void request(long n)
request
in interface Subscription
public final boolean set(Subscription s)
s
- the subscription to set