程序包 | 说明 |
---|---|
reactor.core.observability | |
reactor.core.publisher | |
reactor.test.subscriber |
Components supporting the creation of test-oriented
Subscribers . |
reactor.util.context |
Miscellaneous utility classes, such as loggers, tuples or queue suppliers and implementations.
|
reactor.util.retry |
限定符和类型 | 方法和说明 |
---|---|
SignalListener<T> |
SignalListenerFactory.createListener(org.reactivestreams.Publisher<? extends T> source,
ContextView listenerContext,
STATE publisherContext)
|
限定符和类型 | 方法和说明 |
---|---|
default ContextView |
SynchronousSink.contextView()
Return the current subscriber's context as a
ContextView for inspection. |
default ContextView |
FluxSink.contextView()
Return the current subscriber's context as a
ContextView for inspection. |
default ContextView |
MonoSink.contextView()
Return the current subscriber's context as a
ContextView for inspection. |
ContextView |
Signal.getContextView()
Return the readonly
ContextView that is accessible by the time this Signal was
emitted. |
限定符和类型 | 方法和说明 |
---|---|
Mono<T> |
Mono.contextWrite(ContextView contextToAppend)
将一个
ContextView 和下游的 ContextView 进行合并
Enrich the Context visible from downstream for the benefit of upstream
operators, by making all values from the provided ContextView visible on top
of pairs from downstream. |
Flux<T> |
Flux.contextWrite(ContextView contextToAppend)
Enrich the
Context visible from downstream for the benefit of upstream
operators, by making all values from the provided ContextView visible on top
of pairs from downstream. |
限定符和类型 | 方法和说明 |
---|---|
static <T> Mono<T> |
Mono.deferContextual(java.util.function.Function<ContextView,? extends Mono<? extends T>> contextualMonoFactory)
获取下游设置的上下文内容,如果存在多层Mono嵌套设置上下文
Mono.contextWrite(ContextView) 则取距离最近的上下文
Create a Mono provider that will supply a target Mono
to subscribe to for each Subscriber downstream. |
static <T> Flux<T> |
Flux.deferContextual(java.util.function.Function<ContextView,? extends org.reactivestreams.Publisher<T>> contextualPublisherFactory)
Lazily supply a
Publisher every time a Subscription is made on the
resulting Flux , so the actual source instantiation is deferred until each
subscribe and the Function can create a subscriber-specific instance. |
Mono<T> |
Mono.tap(java.util.function.Function<ContextView,SignalListener<T>> listenerGenerator)
Tap into Reactive Streams signals emitted or received by this
Mono and notify a stateful per-Subscriber
SignalListener . |
Flux<T> |
Flux.tap(java.util.function.Function<ContextView,SignalListener<T>> listenerGenerator)
Tap into Reactive Streams signals emitted or received by this
Flux and notify a stateful per-Subscriber
SignalListener . |
<V> Flux<V> |
Flux.transformDeferredContextual(java.util.function.BiFunction<? super Flux<T>,? super ContextView,? extends org.reactivestreams.Publisher<V>> transformer)
|
<V> Mono<V> |
Mono.transformDeferredContextual(java.util.function.BiFunction<? super Mono<T>,? super ContextView,? extends org.reactivestreams.Publisher<V>> transformer)
|
限定符和类型 | 方法和说明 |
---|---|
TestSubscriberBuilder |
TestSubscriberBuilder.contextPutAll(ContextView toAdd)
Enrich the
Context by putting all entries of the given ContextView in it. |
限定符和类型 | 接口和说明 |
---|---|
interface |
Context
A key/value store that is propagated between components such as operators via the
context protocol.
|
限定符和类型 | 方法和说明 |
---|---|
default ContextView |
Context.readOnly()
Switch to the
ContextView interface, which only allows reading from the
context. |
限定符和类型 | 方法和说明 |
---|---|
java.lang.Class<? extends ContextView> |
ReactorContextAccessor.readableType() |
限定符和类型 | 方法和说明 |
---|---|
static Context |
Context.of(ContextView contextView)
Create a
Context out of a ContextView , enabling write API on top of
the read-only view. |
default Context |
Context.putAll(ContextView other)
Create a new
Context by merging the content of this context and a given
ContextView . |
<T> T |
ReactorContextAccessor.readValue(ContextView sourceContext,
java.lang.Object key) |
void |
ReactorContextAccessor.readValues(ContextView source,
java.util.function.Predicate<java.lang.Object> keyPredicate,
java.util.Map<java.lang.Object,java.lang.Object> target) |
限定符和类型 | 字段和说明 |
---|---|
ContextView |
Retry.retryContext |
限定符和类型 | 方法和说明 |
---|---|
ContextView |
Retry.retryContext()
Return the user provided context that was set at construction time.
|
default ContextView |
Retry.RetrySignal.retryContextView()
Return a read-only view of the user provided context, which may be used to store
objects to be reset/rolled-back or otherwise mutated before or after a retry.
|
限定符和类型 | 方法和说明 |
---|---|
RetrySpec |
RetrySpec.withRetryContext(ContextView retryContext)
Set the user provided
context that can be used to manipulate state on retries. |
RetryBackoffSpec |
RetryBackoffSpec.withRetryContext(ContextView retryContext)
Set the user provided
context that can be used to manipulate state on retries. |