Package reactor.core
Class Scannable.Attr<T>
java.lang.Object
reactor.core.Scannable.Attr<T>
- Type Parameters:
T- the type of data associated with an attribute
- Enclosing interface:
- Scannable
Base class for
Scannable attributes, which all can define a meaningful
default.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAnEnumenumerating the different styles an operator can run : theirEnum.ordinal()reflects the level of confidence in their running mode -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Scannable.Attr<Scannable>The direct dependent component downstream reference if any.static final Scannable.Attr<Boolean>static final Scannable.Attr<Integer>AIntegerattribute implemented by components with a backlog capacity.static final Scannable.Attr<Boolean>ABooleanattribute indicating whether or not a downstream component has interrupted consuming this scanned component, e.g., a cancelled subscription.static final Scannable.Attr<Integer>static final Scannable.Attr<Boolean>Delay_Error exposes aBooleanwhether the scanned component actively supports error delaying if it manages a backlog instead of fast error-passing which might drop pending backlog.static final Scannable.Attr<Throwable>aThrowableattribute which indicate an error state if the scanned component keeps track of it.static final Scannable.Attr<Long>Similar toBUFFERED, but reserved for operators that can hold a backlog of items that can grow beyond Integer.MAX_VALUE.static final Scannable.Attr<String>LIFTER attribute exposes name of the lifter function.static final Scannable.Attr<String>An arbitrary name given to the operator component.static final Scannable.Attr<Scannable>Parent key exposes the direct upstream relationship of the scanned component.static final Scannable.Attr<Integer>Prefetch is anIntegerattribute defining the rate of processing in a component which has capacity to request and hold a backlog of data.static final Scannable.Attr<Long>ALongattribute exposing the current pending demand of a downstream component.static final Scannable.Attr<Scannable>static final Scannable.Attr<Scannable.Attr.RunStyle>AnScannable.Attr.RunStyleenum attribute indicating whether or not an operator continues to operate on the same thread.static final Scannable.Attr<Stream<Tuple2<String,String>>> static final Scannable.Attr<Boolean>ABooleanattribute indicating whether or not an upstream component terminated this scanned component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMeaningful and always applicable default value for the attribute, returned instead of null when a specific value hasn't been defined for a component.
-
Field Details
-
ACTUAL
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 alwaysScannable, but this attribute will convert these raw results to anunavailable scanobject in this case.A reference chain downstream can be navigated via
Scannable.actuals(). -
ACTUAL_METADATA
Indicate that for some purposes aScannableshould be used as additional source of information about a contiguousScannablein the chain.For example
Scannable.steps()uses this to collate thestepNameof an assembly trace to its wrapped operator (the one before it in the assembly chain). -
BUFFERED
AIntegerattribute implemented by components with a backlog capacity. It will expose current queue size or similar related to user-provided held data. Note that some operators and processors CAN keep a backlog larger thanInteger.MAX_VALUE, in which case theAttrLARGE_BUFFERED should be used instead. Such operators will attempt to serve a BUFFERED query but will returnInteger.MIN_VALUEwhen actual buffer size is oversized for int. -
CAPACITY
Return an anIntegercapacity when noPREFETCHis defined or when an arbitrary maximum limit is applied to the backlog capacity of the scanned component.Integer.MAX_VALUEsignal unlimited capacity.Note: This attribute usually resolves to a constant value.
-
CANCELLED
ABooleanattribute indicating whether or not a downstream component has interrupted consuming this scanned component, e.g., a cancelled subscription. Note that it differs fromTERMINATEDwhich is intended for "normal" shutdown cycles. -
DELAY_ERROR
Delay_Error exposes aBooleanwhether the scanned component actively supports error delaying if it manages a backlog instead of fast error-passing which might drop pending backlog.Note: This attribute usually resolves to a constant value.
-
ERROR
aThrowableattribute which indicate an error state if the scanned component keeps track of it. -
LARGE_BUFFERED
Similar toBUFFERED, but reserved for operators that can hold a backlog of items that can grow beyond Integer.MAX_VALUE. These operators will also answer to aBUFFEREDquery up to the point where their buffer is actually too large, at which point they'll return Integer.MIN_VALUE, which serves as a signal that this attribute should be used instead. Defaults to null.Flux.flatMap,Flux.filterWhenandFlux.window(with overlap) are known to use this attribute. -
NAME
An arbitrary name given to the operator component. Defaults to null. -
PARENT
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 alwaysScannable, but this attribute will convert such raw results to anunavailable scanobject in this case.Scannable.parents()can be used to navigate the parent chain. -
RUN_ON
A key that links aScannableto anotherScannableit runs on. Usually exposes a link between an operator/subscriber and itsScheduler.WorkerorScheduler, provided these areScannable. Will returnUNAVAILABLE_SCANif the supporting execution is not Scannable orNULL_SCANif the operator doesn't define a specific runtime. -
PREFETCH
Prefetch is anIntegerattribute defining the rate of processing in a component which has capacity to request and hold a backlog of data. It usually maps to a component capacity when no arbitraryCAPACITYis set.Integer.MAX_VALUEsignal unlimited capacity and therefore unbounded demand.Note: This attribute usually resolves to a constant value.
-
REQUESTED_FROM_DOWNSTREAM
ALongattribute exposing the current pending demand of a downstream component. Note thatLong.MAX_VALUEindicates an unbounded (push-style) demand as specified inSubscription.request(long). -
TERMINATED
-
TAGS
-
RUN_STYLE
AnScannable.Attr.RunStyleenum attribute indicating whether or not an operator continues to operate on the same thread. Each value provides a different degree of guarantee from weakestScannable.Attr.RunStyle.UNKNOWNto strongestScannable.Attr.RunStyle.SYNC. Defaults toScannable.Attr.RunStyle.UNKNOWN. -
LIFTER
LIFTER attribute exposes name of the lifter function. It is calculated asObject.toString()of a function passed to theOperators.lift(java.util.function.BiFunction<reactor.core.Scannable, ? super reactor.core.CoreSubscriber<? super O>, ? extends reactor.core.CoreSubscriber<? super I>>)orOperators.liftPublisher(java.util.function.BiFunction<org.reactivestreams.Publisher, ? super reactor.core.CoreSubscriber<? super O>, ? extends reactor.core.CoreSubscriber<? super I>>). Defaults to null.
-
-
Constructor Details
-
Attr
-
Attr
-
-
Method Details
-
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.- Returns:
- the default value applicable to all components or null if none.
-