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() |
public void cancel()
cancel
in interface Subscription
protected boolean isCancelled()
public void request(long n)
request
in interface Subscription
@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 final boolean set(Subscription s)
s
- the subscription to setprotected void terminate()