Stream queries from
actuals(), parents() and inners(). This allows for
visiting patterns and possibly enable serviceability features.
Scannable is also a useful tool for the advanced user eager to learn which kind of state we usually manage in the package-scope schedulers or operators implementations.
| Modifier and Type | Class and Description |
|---|---|
| public static class | Scannable.Attr<
the type of data associated with an attribute T>Base class for |
| Modifier and Type | Field and Description |
|---|---|
| public static final Pattern | OPERATOR_NAME_UNRELATED_WORDS_PATTERN
The pattern for matching words unrelated to operator name. |
| Modifier and Type | Method and Description |
|---|---|
| public default Stream | Returns: aStream navigating the org.
chain (downward, current Scannable not included).Return a |
| public static Scannable | |
| public default Stream | |
| public default boolean | Returns: true whether the component is available forscan(Attr) resolution.Return true whether the component is available for |
| public default String | Returns: the name of the first parent that has one defined (including this scannable)Check this |
| public default Stream | Returns: aStream navigating the org.
chain (upward, current Scannable not included).Return a |
| public default <T> T | Returns: a value associated to the key or null if unmatched or unresolveda keyAttr to resolve for the component.Introspect a component's specific state |
| public default <T> T | Returns: a value associated to the key or the provided default if unmatched or unresolveda key,Attr to resolve for the component.a fallback value if key resolve to null defaultValue)Introspect a component's specific state |
| public Object | Returns: the value associated to the key for that specific component, or null if none.a keyAttr to resolve for the component.This method is used internally by components to define their key-value mappings in a single place. |
| public default String | |
| public default Stream | |
| public default Stream | Returns: the stream of tags for thisScannable and its reachable parents, including duplicatesVisit this |
| public default Map | tagsDeduplicated()
Visit this |
| OPERATOR_NAME_UNRELATED_WORDS_PATTERN | back to summary |
|---|---|
| public static final Pattern OPERATOR_NAME_UNRELATED_WORDS_PATTERN The pattern for matching words unrelated to operator name. Used to strip an operator name of various prefixes and suffixes. | |
| actuals | back to summary |
|---|---|
| public default Stream Return a
| |
| from | back to summary |
|---|---|
| public static Scannable from(Object o) Attempt to cast the Object to a | |
| inners | back to summary |
|---|---|
| public default Stream Return a | |
| isScanAvailable | back to summary |
|---|---|
| public default boolean isScanAvailable() Return true whether the component is available for
| |
| name | back to summary |
|---|---|
| public default String name() Check this
| |
| parents | back to summary |
|---|---|
| public default Stream Return a
| |
| scan | back to summary |
|---|---|
| public default <T> T scan(Scannable. Introspect a component's specific state | |
| scanOrDefault | back to summary |
|---|---|
| public default <T> T scanOrDefault(Scannable. Introspect a component's specific state | |
| scanUnsafe | back to summary |
|---|---|
| public Object scanUnsafe(Scannable. This method is used internally by components to define their key-value mappings
in a single place. Although it is ignoring the generic type of the
For public consumption of attributes, prefer using | |
| stepName | back to summary |
|---|---|
| public default String stepName() Return a meaningful | |
| steps | back to summary |
|---|---|
| public default Stream List the step names in the chain of
| |
| tags | back to summary |
|---|---|
| public default Stream Visit this
Tags can only be discovered until no parent can be inspected, which happens either
when the source publisher has been reached or when a non-reactor intermediate operator
is present in the parent chain (i.e. a stage that is not | |
| tagsDeduplicated | back to summary |
|---|---|
| public default Map Visit this
Tags can only be discovered until no parent can be inspected, which happens either
when the source publisher has been reached or when a non-reactor intermediate operator
is present in the parent chain (i.e. a stage that is not | |
Scannable attributes, which all can define a meaningful
default.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | Scannable.Attr.RunStyle
An |
| Modifier and Type | Field and Description |
|---|---|
| public static final Scannable. | ACTUAL
The direct dependent component downstream reference if any. |
| public static final Scannable. | ACTUAL_METADATA
Indicate that for some purposes a |
| public static final Scannable. | |
| public static final Scannable. | |
| public static final Scannable. | |
| pack-priv final T | |
| public static final Scannable. | DELAY_ERROR
Delay_Error exposes a |
| public static final Scannable. | |
| public static final Scannable. | LARGE_BUFFERED
Similar to |
| public static final Scannable. | LIFTER
LIFTER attribute exposes name of the lifter function. |
| public static final Scannable. | NAME
An arbitrary name given to the operator component. |
| pack-priv static final Scannable | NULL_SCAN
A constant that represents |
| public static final Scannable. | PARENT
Parent key exposes the direct upstream relationship of the scanned component. |
| public static final Scannable. | |
| public static final Scannable. | REQUESTED_FROM_DOWNSTREAM
A |
| public static final Scannable. | |
| public static final Scannable. | |
| pack-priv final Function | |
| public static final Scannable. | TAGS
A |
| public static final Scannable. | TERMINATED
A |
| pack-priv static final Scannable | UNAVAILABLE_SCAN
A constant that represents |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public T | Returns: the default value applicable to all components or null if none.Meaningful and always applicable default value for the attribute, returned instead of null when a specific value hasn't been defined for a component. |
| pack-priv boolean | Returns: true if the attribute can safely convert any object, false if it can throwClassCastExceptionChecks if this attribute is capable of safely converting any Object into
a |
| pack-priv static Stream | |
| pack-priv T | Returns: the converted instancethe instance to attempt conversion on o)Attempt to convert any |
| ACTUAL | back to summary |
|---|---|
| public static final Scannable. The direct dependent component downstream reference if any. Operators in
Flux/Mono for instance delegate to a target Subscriber, which is going to be
the actual chain navigated with this reference key. Subscribers are not always
A reference chain downstream can be navigated via | |
| ACTUAL_METADATA | back to summary |
|---|---|
| public static final Scannable. Indicate that for some purposes a
For example | |
| BUFFERED | back to summary |
|---|---|
| public static final Scannable. A | |
| CANCELLED | back to summary |
|---|---|
| public static final Scannable. A | |
| CAPACITY | back to summary |
|---|---|
| public static final Scannable. Return an an Note This attribute usually resolves to a constant value. | |
| defaultValue | back to summary |
|---|---|
| pack-priv final T defaultValue | |
| DELAY_ERROR | back to summary |
|---|---|
| public static final Scannable. Delay_Error exposes a Note This attribute usually resolves to a constant value. | |
| ERROR | back to summary |
|---|---|
| public static final Scannable. a | |
| LARGE_BUFFERED | back to summary |
|---|---|
| public static final Scannable. Similar to
| |
| LIFTER | back to summary |
|---|---|
| public static final Scannable. LIFTER attribute exposes name of the lifter function. It is calculated as | |
| NAME | back to summary |
|---|---|
| public static final Scannable. An arbitrary name given to the operator component. Defaults to null. | |
| NULL_SCAN | back to summary |
|---|---|
| pack-priv static final Scannable NULL_SCAN A constant that represents | |
| PARENT | back to summary |
|---|---|
| public static final Scannable. Parent key exposes the direct upstream relationship of the scanned component.
It can be a Publisher source to an operator, a Subscription to a Subscriber
(main flow if ambiguous with inner Subscriptions like flatMap), a Scheduler to
a Worker. These types are not always
| |
| PREFETCH | back to summary |
|---|---|
| public static final Scannable. Prefetch is an Note This attribute usually resolves to a constant value. | |
| REQUESTED_FROM_DOWNSTREAM | back to summary |
|---|---|
| public static final Scannable. A | |
| RUN_ON | back to summary |
|---|---|
| public static final Scannable. A key that links a | |
| RUN_STYLE | back to summary |
|---|---|
| public static final Scannable. An | |
| safeConverter | back to summary |
|---|---|
| pack-priv final Function<Object, ? extends T> safeConverter | |
| TAGS | back to summary |
|---|---|
| public static final Scannable. A | |
| TERMINATED | back to summary |
|---|---|
| public static final Scannable. A | |
| UNAVAILABLE_SCAN | back to summary |
|---|---|
| pack-priv static final Scannable UNAVAILABLE_SCAN A constant that represents | |
| Attr | back to summary |
|---|---|
| protected Attr(T defaultValue) | |
| Attr | back to summary |
|---|---|
| protected Attr(T defaultValue, Function<Object, ? extends T> safeConverter) | |
| defaultValue | back to summary |
|---|---|
| public T defaultValue() Meaningful and always applicable default value for the attribute, returned instead of null when a specific value hasn't been defined for a component. null if no sensible generic default is available.
| |
| isConversionSafe | back to summary |
|---|---|
| pack-priv boolean isConversionSafe() Checks if this attribute is capable of safely converting any Object into
a
| |
| recurse | back to summary |
|---|---|
| pack-priv static Stream | |
| tryConvert | back to summary |
|---|---|
| pack-priv T tryConvert(Object o) Attempt to convert any | |
Enum enumerating the different styles an operator can run : their ordinal() reflects the level of confidence
in their running mode
| Modifier and Type | Field and Description |
|---|---|
| public static final Scannable. | ASYNC
the operator may change threads while running |
| public static final Scannable. | SYNC
guarantees the operator doesn't change threads (strongest level of guarantee) |
| public static final Scannable. | UNKNOWN
no guarantees can be given on the running mode (default value, weakest level of guarantee) |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Scannable. | |
| public static Scannable. |
| ASYNC | back to summary |
|---|---|
| public static final Scannable. the operator may change threads while running | |
| SYNC | back to summary |
|---|---|
| public static final Scannable. guarantees the operator doesn't change threads (strongest level of guarantee) | |
| UNKNOWN | back to summary |
|---|---|
| public static final Scannable. no guarantees can be given on the running mode (default value, weakest level of guarantee) | |
| RunStyle | back to summary |
|---|---|
| private RunStyle() | |
| valueOf | back to summary |
|---|---|
| public static Scannable. | |
| values | back to summary |
|---|---|
| public static Scannable. | |