程序包 | 说明 |
---|---|
reactor.core.publisher | |
reactor.core.scheduler |
Scheduler contract and static
registry and factory methods in Schedulers . |
reactor.guide | |
reactor.test.publisher |
Components supporting the creation of test-oriented
Publishers . |
reactor.util.retry |
限定符和类型 | 类和说明 |
---|---|
class |
MonoOperator<I,O>
|
class |
MonoProcessor<O>
已过时。
Processors will be removed in 3.5. Prefer using
Sinks.One or Sinks.Empty instead,
or see https://github.com/reactor/reactor-core/issues/2431 for alternatives |
限定符和类型 | 方法和说明 |
---|---|
Mono<java.lang.Boolean> |
Flux.all(java.util.function.Predicate<? super T> predicate)
如果此序列的所有值都与
Predicate 匹配,则发出单个布尔值 true. |
Mono<java.lang.Void> |
Mono.and(org.reactivestreams.Publisher<?> other)
将多个不需要关注结果的源进行合并,不会对异常进行回播。
|
Mono<java.lang.Boolean> |
Flux.any(java.util.function.Predicate<? super T> predicate)
Emit a single boolean true if any of the values of this
Flux sequence match
the predicate. |
Mono<T> |
Sinks.Empty.asMono()
Return a
Mono view of this sink. |
Mono<T> |
Mono.cache()
将此Mono变成热源并且被订阅一次后就无限缓存。
|
Mono<T> |
Mono.cache(java.time.Duration ttl)
根据
Duration 指定 Mono 缓存失效时间
Turn this Mono into a hot source and cache last emitted signals for further
Subscriber , with an expiry timeout. |
Mono<T> |
Mono.cache(java.time.Duration ttl,
Scheduler timer)
根据 Duration 指定 Mono 缓存失效时间,使用指定调度器检测过期时间
Turn this
Mono into a hot source and cache last emitted signals for further
Subscriber , with an expiry timeout. |
Mono<T> |
Mono.cache(java.util.function.Function<? super T,java.time.Duration> ttlForValue,
java.util.function.Function<java.lang.Throwable,java.time.Duration> ttlForError,
java.util.function.Supplier<java.time.Duration> ttlForEmpty)
可指定当Mono成功发布,异常,返回Empty场景的缓存时间
Turn this
Mono into a hot source and cache last emitted signal for further
Subscriber , with an expiry timeout (TTL) that depends on said signal. |
Mono<T> |
Mono.cache(java.util.function.Function<? super T,java.time.Duration> ttlForValue,
java.util.function.Function<java.lang.Throwable,java.time.Duration> ttlForError,
java.util.function.Supplier<java.time.Duration> ttlForEmpty,
Scheduler timer)
可指定当Mono成功发布,异常,返回Empty场景的缓存时间,并指定检测超时的线程池
Turn this
Mono into a hot source and cache last emitted signal for further
Subscriber , with an expiry timeout (TTL) that depends on said signal. |
Mono<T> |
Mono.cacheInvalidateIf(java.util.function.Predicate<? super T> invalidationPredicate)
当存在多个订阅者时,可以使用此方法决定当前元素缓存是否失效,true则失效。
|
Mono<T> |
Mono.cacheInvalidateWhen(java.util.function.Function<? super T,Mono<java.lang.Void>> invalidationTriggerGenerator)
自定义控制缓存失效。
|
Mono<T> |
Mono.cacheInvalidateWhen(java.util.function.Function<? super T,Mono<java.lang.Void>> invalidationTriggerGenerator,
java.util.function.Consumer<? super T> onInvalidate)
自定义控制缓存失效且提供一个Consumer处理失效的值
Cache
onNext signal received from the source and replay it to other subscribers,
while allowing invalidation via a Mono<Void> companion trigger generated from the currently
cached value. |
Mono<T> |
Mono.cancelOn(Scheduler scheduler)
|
<E> Mono<E> |
Mono.cast(java.lang.Class<E> clazz)
将当前Mono产生的类型转换为目标类型,如果两种类型不能转换则抛出异常
Cast the current
Mono produced type into a target produced type. |
Mono<T> |
Mono.checkpoint()
激活调试模式 - 又名回溯
如果你知道问题出在哪个链上,但是由于这个链的上游或下游来自其他的调用,就可以针对这个链使用checkpoint()进行问题定位
Activate traceback (full assembly tracing) for this particular
Mono , in case of an error
upstream of the checkpoint. |
Mono<T> |
Mono.checkpoint(java.lang.String description)
可以添加描述的调试模式
Activate traceback (assembly marker) for this particular
Mono by giving it a description that
will be reflected in the assembly traceback in case of an error upstream of the
checkpoint. |
Mono<T> |
Mono.checkpoint(java.lang.String description,
boolean forceStackTrace)
Activate traceback (full assembly tracing or the lighter assembly marking depending on the
forceStackTrace option). |
<R,A> Mono<R> |
Flux.collect(java.util.stream.Collector<? super T,A,? extends R> collector)
Collect all elements emitted by this
Flux into a container,
by applying a Java 8 Stream API Collector
The collected result will be emitted when this sequence completes, emitting
the empty container if the sequence was empty. |
<E> Mono<E> |
Flux.collect(java.util.function.Supplier<E> containerSupplier,
java.util.function.BiConsumer<E,? super T> collector)
自定义收集
Collect all elements emitted by this
Flux into a user-defined container,
by applying a collector BiConsumer taking the container and each element. |
Mono<java.util.List<T>> |
Flux.collectList()
|
<K> Mono<java.util.Map<K,T>> |
Flux.collectMap(java.util.function.Function<? super T,? extends K> keyExtractor)
收集Flux发布的元素到Map中,自定义Key,Value为原值.允许
Flux.empty()
Collect all elements emitted by this Flux into a hashed Map that is
emitted by the resulting Mono when this sequence completes, emitting the
empty Map if the sequence was empty. |
<K,V> Mono<java.util.Map<K,V>> |
Flux.collectMap(java.util.function.Function<? super T,? extends K> keyExtractor,
java.util.function.Function<? super T,? extends V> valueExtractor)
|
<K,V> Mono<java.util.Map<K,V>> |
Flux.collectMap(java.util.function.Function<? super T,? extends K> keyExtractor,
java.util.function.Function<? super T,? extends V> valueExtractor,
java.util.function.Supplier<java.util.Map<K,V>> mapSupplier)
|
<K> Mono<java.util.Map<K,java.util.Collection<T>>> |
Flux.collectMultimap(java.util.function.Function<? super T,? extends K> keyExtractor)
分组,类似Java Stream 的 groupBy,兼容
Flux.empty()
Collect all elements emitted by this Flux into a multimap that is
emitted by the resulting Mono when this sequence completes, emitting the
empty multimap if the sequence was empty. |
<K,V> Mono<java.util.Map<K,java.util.Collection<V>>> |
Flux.collectMultimap(java.util.function.Function<? super T,? extends K> keyExtractor,
java.util.function.Function<? super T,? extends V> valueExtractor)
|
<K,V> Mono<java.util.Map<K,java.util.Collection<V>>> |
Flux.collectMultimap(java.util.function.Function<? super T,? extends K> keyExtractor,
java.util.function.Function<? super T,? extends V> valueExtractor,
java.util.function.Supplier<java.util.Map<K,java.util.Collection<V>>> mapSupplier)
|
Mono<java.util.List<T>> |
Flux.collectSortedList()
|
Mono<java.util.List<T>> |
ParallelFlux.collectSortedList(java.util.Comparator<? super T> comparator)
Sorts the 'rails' according to the comparator and returns a full sorted list as a
Publisher.
|
Mono<java.util.List<T>> |
Flux.collectSortedList(java.util.Comparator<? super T> comparator)
|
Mono<java.util.List<T>> |
ParallelFlux.collectSortedList(java.util.Comparator<? super T> comparator,
int capacityHint)
Sorts the 'rails' according to the comparator and returns a full sorted list as a
Publisher.
|
Mono<T> |
Mono.contextCapture()
用于支持 context-propagation 第三方库,实现ThreadLocal和上下文传播
If context-propagation library
is on the classpath, this is a convenience shortcut to capture thread local values during the
subscription phase and put them in the
Context that is visible upstream of this operator. |
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. |
Mono<T> |
Mono.contextWrite(java.util.function.Function<Context,Context> contextModifier)
|
static <T> Mono<T> |
Hooks.convertToMonoBypassingHooks(org.reactivestreams.Publisher<T> publisher,
boolean enforceMonoContract)
|
Mono<java.lang.Long> |
Flux.count()
统计元素个数,当观察到 onComplete 时返回统计数
Counts the number of values in this
Flux . |
static <T> Mono<T> |
Mono.create(java.util.function.Consumer<MonoSink<T>> callback)
允许同步或异步通过
MonoSink 创建一个Mono
Creates a deferred emitter that can be used with callback-based
APIs to signal at most one value, a complete or an error signal. |
Mono<T> |
Mono.defaultIfEmpty(T defaultV)
如果Mono是
empty() 则提供一个默认值
Provide a default single value if this mono is completed without any data
|
static <T> Mono<T> |
Mono.defer(java.util.function.Supplier<? extends Mono<? extends T>> supplier)
为每个订阅者延迟发布一个元素,在被订阅时在发布者端延迟发布(懒汉式创建,而
just(Object) 则是饿汉式创建)
Create a Mono provider that will supply a target Mono to subscribe to for
each Subscriber downstream. |
static <T> Mono<T> |
Mono.deferContextual(java.util.function.Function<ContextView,? extends Mono<? extends T>> contextualMonoFactory)
获取下游设置的上下文内容,如果存在多层Mono嵌套设置上下文
contextWrite(ContextView) 则取距离最近的上下文
Create a Mono provider that will supply a target Mono
to subscribe to for each Subscriber downstream. |
static Mono<java.lang.Long> |
Mono.delay(java.time.Duration duration)
在默认Scheduler上创建一个Mono,它将onNext信号延迟给定的时间。
|
static Mono<java.lang.Long> |
Mono.delay(java.time.Duration duration,
Scheduler timer)
在指定Scheduler上创建一个Mono,它将onNext信号延迟给定的时间。
|
Mono<T> |
Mono.delayElement(java.time.Duration delay)
将此Mono元素(Subscriber.onNext信号)延迟给定的持续时间(并行调度)。
|
Mono<T> |
Mono.delayElement(java.time.Duration delay,
Scheduler timer)
|
Mono<T> |
Mono.delaySubscription(java.time.Duration delay)
延迟订阅,直到延期订阅时间到期
Delay the
subscription to this Mono source until the given
period elapses. |
Mono<T> |
Mono.delaySubscription(java.time.Duration delay,
Scheduler timer)
|
<U> Mono<T> |
Mono.delaySubscription(org.reactivestreams.Publisher<U> subscriptionDelay)
Delay the subscription to this
Mono until another Publisher
signals a value or completes. |
Mono<T> |
Mono.delayUntil(java.util.function.Function<? super T,? extends org.reactivestreams.Publisher<?>> triggerProvider)
中继触发器,将当前发布者的发布延迟到下一个发布者的发布
Subscribe to this
Mono and another Publisher that is generated from
this Mono's element and which will be used as a trigger for relaying said element. |
<X> Mono<X> |
Mono.dematerialize()
当这个Mono使用
Signal 信号量的 onNext、onError、onComplete时,可以使用这个方法让流消失,让订阅者订阅信号量
An operator working only if this Mono emits onNext, onError or onComplete Signal
instances, transforming these materialized signals into
real signals on the Subscriber . |
Mono<T> |
Mono.doAfterTerminate(java.lang.Runnable afterTerminate)
在Mono终止后触发的行为
Add behavior (side-effect) triggered after the
Mono terminates, either by
completing downstream successfully or with an error. |
Mono<T> |
Mono.doFinally(java.util.function.Consumer<SignalType> onFinally)
Mono因任何原因终止后添加行为触发(包括取消、终止、完成),会传递一个信号量类型通知你
SignalType
Add behavior triggering after the Mono terminates for any reason,
including cancellation. |
Mono<T> |
Mono.doFirst(java.lang.Runnable onFirst)
添加在订阅Mono之前触发的行为(未开始请求数据),这应该是装配时间之后的第一个事件。
|
Mono<T> |
Mono.doOnCancel(java.lang.Runnable onCancel)
添加取消时的触发行为,首先执行
Runnable ,然后将取消信号向上游传播到源
Add behavior triggered when the Mono is cancelled. |
<R> Mono<T> |
Mono.doOnDiscard(java.lang.Class<R> type,
java.util.function.Consumer<? super R> discardHook)
在非常特殊的情况下,你的应用程序可能会处理那些一旦不再使用就需要某种形式清理的类型。
|
Mono<T> |
Mono.doOnEach(java.util.function.Consumer<? super Signal<T>> signalConsumer)
添加当Mono发布、错误失败或成功完成时触发的行为。
|
<E extends java.lang.Throwable> |
Mono.doOnError(java.lang.Class<E> exceptionType,
java.util.function.Consumer<? super E> onError)
添加当Mono因异常终止并且匹配指定异常类型触发的行为。
|
Mono<T> |
Mono.doOnError(java.util.function.Consumer<? super java.lang.Throwable> onError)
添加Mono因异常而终止时触发的行为,Consumer首先被执行,然后 onError 信号被传播到下游
Add behavior triggered when the
Mono completes with an error. |
Mono<T> |
Mono.doOnError(java.util.function.Predicate<? super java.lang.Throwable> predicate,
java.util.function.Consumer<? super java.lang.Throwable> onError)
添加当Mono完成并出现与给定
Predicate (泛型 Throwable) 匹配的错误时触发的行为。 |
Mono<T> |
Mono.doOnNext(java.util.function.Consumer<? super T> onNext)
添加当Mono成功发出数据时触发的行为,
Consumer 首先执行,然后将 onNext 信号传播到下游
Add behavior triggered when the Mono emits a data successfully. |
Mono<T> |
Mono.doOnRequest(java.util.function.LongConsumer consumer)
当Mono收到任何请求时添加触发LongConsumer行为 (Long为背压数)。
|
Mono<T> |
Mono.doOnSubscribe(java.util.function.Consumer<? super org.reactivestreams.Subscription> onSubscribe)
当发布者被订阅时触发,先传递
Subscription 订阅者给 Consumer 处理后,再将信号传播到下游
Add behavior (side-effect) triggered when the Mono is being subscribed,
that is to say when a Subscription has been produced by the Publisher
and is being passed to the Subscriber.onSubscribe(Subscription) . |
Mono<T> |
Mono.doOnSuccess(java.util.function.Consumer<? super T> onSuccess)
一旦可以认为Mono已成功完成,就会触发添加行为。
|
Mono<T> |
Mono.doOnTerminate(java.lang.Runnable onTerminate)
添加当Mono终止时触发的行为,可以是在正常完成,异常,返回空Mono时触发
Add behavior triggered when the
Mono terminates, either by completing with a value,
completing empty or failing with an error. |
Mono<Tuple2<java.lang.Long,T>> |
Mono.elapsed()
|
Mono<Tuple2<java.lang.Long,T>> |
Mono.elapsed(Scheduler scheduler)
返回一个 Tuple2, 第一个值是生成数据的耗时,并指定线程池去记录耗时
Map this
Mono sequence into Tuple2<Long, T>
of timemillis and source data. |
Mono<T> |
Flux.elementAt(int index)
丢弃操作,丢弃指定下标之前的元素并返回指定下标的元素
Emit only the element at the given index position or
IndexOutOfBoundsException
if the sequence is shorter. |
Mono<T> |
Flux.elementAt(int index,
T defaultValue)
Emit only the element at the given index position or fall back to a
default value if the sequence is shorter.
|
static <T> Mono<T> |
Mono.empty()
创建一个不发布任何元素的空Mono
Create a
Mono that completes without emitting any item. |
static <T> Mono<T> |
Mono.error(java.util.function.Supplier<? extends java.lang.Throwable> errorSupplier)
创建一个在订阅后立即以错误终止的Mono 。
|
static <T> Mono<T> |
Mono.error(java.lang.Throwable error)
创建一个Mono,它在订阅后立即以指定的错误终止
Create a
Mono that terminates with the specified error immediately after
being subscribed to. |
Mono<T> |
Mono.filter(java.util.function.Predicate<? super T> tester)
过滤,只回放结果为 true 的元素
If this
Mono is valued, test the result and replay it if predicate returns true. |
Mono<T> |
Mono.filterWhen(java.util.function.Function<? super T,? extends org.reactivestreams.Publisher<java.lang.Boolean>> asyncPredicate)
和filter一样都是过滤,不过返回的是
Publisher 的布尔类型
If this Mono is valued, test the value asynchronously using a generated
Publisher<Boolean> test. |
static <T> Mono<T> |
Mono.first(java.lang.Iterable<? extends Mono<? extends T>> monos)
已过时。
use
firstWithSignal(Iterable) . To be removed in reactor 3.5. |
static <T> Mono<T> |
Mono.first(Mono<? extends T>... monos)
已过时。
use
firstWithSignal(Mono[]) . To be removed in reactor 3.5. |
static <T> Mono<T> |
Mono.firstWithSignal(java.lang.Iterable<? extends Mono<? extends T>> monos)
给定一个Mono列表,如果第一个异常则处理第二个,返回第一个执行完成的Mono
Pick the first
Mono to emit any signal (value, empty completion or error)
and replay that signal, effectively behaving like the fastest of these competing
sources. |
static <T> Mono<T> |
Mono.firstWithSignal(Mono<? extends T>... monos)
给定一个不定长的Mono列表,如果第一个异常则处理第二个,返回第一个执行完成的Mono
Pick the first
Mono to emit any signal (value, empty completion or error)
and replay that signal, effectively behaving like the fastest of these competing
sources. |
static <T> Mono<T> |
Mono.firstWithValue(java.lang.Iterable<? extends Mono<? extends T>> monos)
用迭代器给定一批Mono,处理第一个有元素的Mono。
|
static <T> Mono<T> |
Mono.firstWithValue(Mono<? extends T> first,
Mono<? extends T>... others)
给定一批Mono,处理第一个有元素的Mono。
|
<R> Mono<R> |
Mono.flatMap(java.util.function.Function<? super T,? extends Mono<? extends R>> transformer)
|
static <T> Mono<T> |
Mono.from(org.reactivestreams.Publisher<? extends T> source)
|
static <T> Mono<T> |
Mono.fromCallable(java.util.concurrent.Callable<? extends T> supplier)
|
static <T> Mono<T> |
Mono.fromCompletionStage(java.util.concurrent.CompletionStage<? extends T> completionStage)
|
static <T> Mono<T> |
Mono.fromCompletionStage(java.util.function.Supplier<? extends java.util.concurrent.CompletionStage<? extends T>> stageSupplier)
懒加载地使用
CompletionStage 创建一个Mono
Create a Mono that wraps a lazily-supplied CompletionStage on subscription,
emitting the value produced by the CompletionStage . |
static <I> Mono<I> |
Mono.fromDirect(org.reactivestreams.Publisher<? extends I> source)
将Publisher转换为Mono而不进行任何基数检查(即此方法不会取消第一个元素之后的源)。
|
static <T> Mono<T> |
Mono.fromFuture(java.util.concurrent.CompletableFuture<? extends T> future)
使用
CompletableFuture 创建一个Mono
Create a Mono , producing its value using the provided CompletableFuture
and cancelling the future if the Mono gets cancelled. |
static <T> Mono<T> |
Mono.fromFuture(java.util.concurrent.CompletableFuture<? extends T> future,
boolean suppressCancel)
使用
CompletableFuture 创建一个Mono, 当Mono被取消订阅时可以选自是否取消 CompletableFuture
Create a Mono , producing its value using the provided CompletableFuture
and optionally cancelling the future if the Mono gets cancelled (if suppressCancel == false ). |
static <T> Mono<T> |
Mono.fromFuture(java.util.function.Supplier<? extends java.util.concurrent.CompletableFuture<? extends T>> futureSupplier)
使用
CompletableFuture 懒加载创建一个Mono
Create a Mono that wraps a lazily-supplied CompletableFuture on subscription,
emitting the value produced by the future and cancelling the future if the Mono gets cancelled. |
static <T> Mono<T> |
Mono.fromFuture(java.util.function.Supplier<? extends java.util.concurrent.CompletableFuture<? extends T>> futureSupplier,
boolean suppressCancel)
使用 CompletableFuture 懒加载创建一个Mono, 当Mono被取消订阅时可以选自是否取消 CompletableFuture
Create a
Mono that wraps a lazily-supplied CompletableFuture on subscription,
emitting the value produced by the future and optionally cancelling the future if the Mono gets cancelled
(if suppressCancel == false ). |
static <T> Mono<T> |
Mono.fromRunnable(java.lang.Runnable runnable)
|
static <T> Mono<T> |
Mono.fromSupplier(java.util.function.Supplier<? extends T> supplier)
|
<R> Mono<R> |
Mono.handle(java.util.function.BiConsumer<? super T,SynchronousSink<R>> handler)
通过为每个 onNext 调用带有输出接收器的
BiConsumer 来处理此Mono发出的项目,相比与 map(Function) ,
它可以往Sink里传递 SynchronousSink.error(Throwable) 或 SynchronousSink.complete()
Handle the items emitted by this Mono by calling a biconsumer with the
output sink for each onNext. |
Mono<java.lang.Boolean> |
Mono.hasElement()
判断是否存在发布的元素
Emit a single boolean true if this
Mono has an element. |
Mono<java.lang.Boolean> |
Flux.hasElement(T value)
Emit a single boolean true if any of the elements of this
Flux sequence is
equal to the provided value. |
Mono<java.lang.Boolean> |
Flux.hasElements()
Emit a single boolean true if this
Flux sequence has at least one element. |
Mono<T> |
Mono.hide()
包装另一个 Mono 并隐藏其身份,包括其订阅者
Hides the identity of this
Mono instance. |
Mono<T> |
Mono.ignoreElement()
忽略 onNext 信号(丢弃它)并且只传播终止事件
Ignores onNext signal (dropping it) and only propagates termination events.
|
Mono<T> |
Flux.ignoreElements()
Ignores onNext signals (dropping them) and only propagate termination events.
|
static <T> Mono<T> |
Mono.ignoreElements(org.reactivestreams.Publisher<T> source)
创建一个完全忽略元素的Mono
Create a new
Mono that ignores elements from the source (dropping them),
but completes when the source completes. |
static <T> Mono<T> |
Mono.just(T data)
最简单创建一个Mono
Create a new
Mono that emits the specified item, which is captured at
instantiation time. |
static <T> Mono<T> |
Mono.justOrEmpty(java.util.Optional<? extends T> data)
|
static <T> Mono<T> |
Mono.justOrEmpty(T data)
|
Mono<T> |
Flux.last()
获取序列最后一个元素,如果序列为空抛出
NoSuchElementException
Emit the last element observed before complete signal as a Mono , or emit
NoSuchElementException error if the source was empty. |
Mono<T> |
Flux.last(T defaultValue)
Emit the last element observed before complete signal as a
Mono , or emit
the defaultValue if the source was empty. |
Mono<T> |
Mono.log()
观察所有 Reactive Streams 信号并使用Logger支持跟踪它们
Observe all Reactive Streams signals and trace them using
Logger support. |
Mono<T> |
Mono.log(Logger logger)
Observe Reactive Streams signals matching the passed filter
options and
trace them using a specific user-provided Logger , at Level.INFO level. |
Mono<T> |
Mono.log(Logger logger,
java.util.logging.Level level,
boolean showOperatorLine,
SignalType... options)
Observe Reactive Streams signals matching the passed filter
options and
trace them using a specific user-provided Logger , at the given Level . |
Mono<T> |
Mono.log(java.lang.String category)
Observe all Reactive Streams signals and use
Logger support to handle trace implementation. |
Mono<T> |
Mono.log(java.lang.String category,
java.util.logging.Level level,
boolean showOperatorLine,
SignalType... options)
Observe Reactive Streams signals matching the passed filter
options and
use Logger support to
handle trace
implementation. |
Mono<T> |
Mono.log(java.lang.String category,
java.util.logging.Level level,
SignalType... options)
Observe Reactive Streams signals matching the passed flags
options and use
Logger support to handle trace implementation. |
<R> Mono<R> |
Mono.map(java.util.function.Function<? super T,? extends R> mapper)
同步方式转换元素
Transform the item emitted by this
Mono by applying a synchronous function to it. |
<R> Mono<R> |
Mono.mapNotNull(java.util.function.Function<? super T,? extends R> mapper)
转换流中的元素,并忽略null值
Transform the item emitted by this
Mono by applying a synchronous function to it, which is allowed
to produce a null value. |
Mono<Signal<T>> |
Mono.materialize()
|
Mono<T> |
Mono.metrics()
已过时。
Prefer using the
tap(SignalListenerFactory) with the SignalListenerFactory provided by
the new reactor-core-micrometer module. To be removed in 3.6.0 at the earliest. |
Mono<T> |
Mono.name(java.lang.String name)
为这个序列起一个前缀名字
Give a name to this sequence, which can be retrieved using
Scannable.name()
as long as this is the first reachable Scannable.parents() . |
static <T> Mono<T> |
Mono.never()
|
Mono<T> |
Flux.next()
仅将Flux发出的第一个元素发布到新的Mono中。
|
<U> Mono<U> |
Mono.ofType(java.lang.Class<U> clazz)
判断当前Mono的类型能否转换成指定类型,不能转换则直接忽略
Evaluate the emitted value against the given
Class type. |
Mono<T> |
Mono.onErrorComplete()
吃掉Error信号,只需将 onError 信号替换为 onComplete 信号即可完成序列。
|
Mono<T> |
Mono.onErrorComplete(java.lang.Class<? extends java.lang.Throwable> type)
如果错误与给定的Class匹配,只需将onError signal替换为onComplete signal即可完成序列。
|
Mono<T> |
Mono.onErrorComplete(java.util.function.Predicate<? super java.lang.Throwable> predicate)
使用一个
Predicate 返回的布尔值来决定是否吞掉异常让源完成
Simply complete the sequence by replacing an onError signal
with an onComplete signal if the error matches the given
Predicate . |
Mono<T> |
Mono.onErrorContinue(java.util.function.BiConsumer<java.lang.Throwable,java.lang.Object> errorConsumer)
Let compatible operators upstream recover from errors by dropping the
incriminating element from the sequence and continuing with subsequent elements.
|
<E extends java.lang.Throwable> |
Mono.onErrorContinue(java.lang.Class<E> type,
java.util.function.BiConsumer<java.lang.Throwable,java.lang.Object> errorConsumer)
Let compatible operators upstream recover from errors by dropping the
incriminating element from the sequence and continuing with subsequent elements.
|
<E extends java.lang.Throwable> |
Mono.onErrorContinue(java.util.function.Predicate<E> errorPredicate,
java.util.function.BiConsumer<java.lang.Throwable,java.lang.Object> errorConsumer)
Let compatible operators upstream recover from errors by dropping the
incriminating element from the sequence and continuing with subsequent elements.
|
<E extends java.lang.Throwable> |
Mono.onErrorMap(java.lang.Class<E> type,
java.util.function.Function<? super E,? extends java.lang.Throwable> mapper)
如果错误与给定类型匹配,则通过同步应用函数来转换此Mono发出的错误。
|
Mono<T> |
Mono.onErrorMap(java.util.function.Function<? super java.lang.Throwable,? extends java.lang.Throwable> mapper)
通过同步方法,将一个类型的异常转换为另一种类型的异常
Transform any error emitted by this
Mono by synchronously applying a function to it. |
Mono<T> |
Mono.onErrorMap(java.util.function.Predicate<? super java.lang.Throwable> predicate,
java.util.function.Function<? super java.lang.Throwable,? extends java.lang.Throwable> mapper)
如果错误与给定
Predicate 匹配,则通过同步应用函数来转换此Mono发出的错误。 |
<E extends java.lang.Throwable> |
Mono.onErrorResume(java.lang.Class<E> type,
java.util.function.Function<? super E,? extends Mono<? extends T>> fallback)
当发生与给定类型匹配的错误时进行错误恢复(动态候补值),当上游发生异常进行回调
Subscribe to a fallback publisher when an error matching the given type
occurs, using a function to choose the fallback depending on the error.
|
Mono<T> |
Mono.onErrorResume(java.util.function.Function<? super java.lang.Throwable,? extends Mono<? extends T>> fallback)
错误恢复(动态候补值),当上游发生异常进行回调
Subscribe to a fallback publisher when any error occurs, using a function to
choose the fallback depending on the error.
|
Mono<T> |
Mono.onErrorResume(java.util.function.Predicate<? super java.lang.Throwable> predicate,
java.util.function.Function<? super java.lang.Throwable,? extends Mono<? extends T>> fallback)
当与给定的
Predicate 匹配时,进行错误恢复(动态候补值),当上游发生异常进行回调
Subscribe to a fallback publisher when an error matching a given predicate
occurs. |
<E extends java.lang.Throwable> |
Mono.onErrorReturn(java.lang.Class<E> type,
T fallbackValue)
当Mono的异常和给定的异常匹配,返回一个默认的值
Simply emit a captured fallback value when an error of the specified type is
observed on this
Mono . |
Mono<T> |
Mono.onErrorReturn(java.util.function.Predicate<? super java.lang.Throwable> predicate,
T fallbackValue)
如果Mono发生的异常与
Predicate 匹配,则返回一个默认的值
Simply emit a captured fallback value when an error matching the given predicate is
observed on this Mono . |
Mono<T> |
Mono.onErrorReturn(T fallbackValue)
当前Mono发生异常时,返回一个默认的值
Simply emit a captured fallback value when any error is observed on this
Mono . |
Mono<T> |
Mono.onErrorStop()
If an
onErrorContinue(BiConsumer) variant has been used downstream, reverts
to the default 'STOP' mode where errors are terminal events upstream. |
Mono<T> |
Mono.onTerminateDetach()
在终止或取消时分离
Subscriber (事件处理者,是真正去响应事件和处理数据的角色) 和
Subscription (订阅者,是实际从Publisher中获取数据的角色)
Detaches both the child Subscriber and the Subscription on
termination or cancellation. |
Mono<T> |
Mono.or(Mono<? extends T> other)
从当前Mono或给定的另一个Mono发布一个可用的元素
Emit the first available signal from this mono or the other mono.
|
<R> Mono<R> |
Mono.publish(java.util.function.Function<? super Mono<T>,? extends Mono<? extends R>> transform)
再次发布
Share a
Mono for the duration of a function that may transform it and
consume it as many times as necessary without causing multiple subscriptions
to the upstream. |
Mono<T> |
Flux.publishNext()
已过时。
use
Flux.shareNext() instead, or use `publish().next()` if you need
to `connect() . To be removed in 3.5.0 |
Mono<T> |
Mono.publishOn(Scheduler scheduler)
|
<A> Mono<A> |
Flux.reduce(A initial,
java.util.function.BiFunction<A,? super T,A> accumulator)
Reduce the values from this
Flux sequence into a single object matching the
type of a seed value. |
Mono<T> |
ParallelFlux.reduce(java.util.function.BiFunction<T,T,T> reducer)
Reduces all values within a 'rail' and across 'rails' with a reducer function into
a single sequential value.
|
Mono<T> |
Flux.reduce(java.util.function.BiFunction<T,T,T> aggregator)
|
<A> Mono<A> |
Flux.reduceWith(java.util.function.Supplier<A> initial,
java.util.function.BiFunction<A,? super T,A> accumulator)
Reduce the values from this
Flux sequence into a single object matching the
type of a lazily supplied seed value. |
Mono<T> |
Mono.repeatWhenEmpty(java.util.function.Function<Flux<java.lang.Long>,? extends org.reactivestreams.Publisher<?>> repeatFactory)
|
Mono<T> |
Mono.repeatWhenEmpty(int maxRepeat,
java.util.function.Function<Flux<java.lang.Long>,? extends org.reactivestreams.Publisher<?>> repeatFactory)
|
Mono<T> |
Mono.retry()
异常无限重试
Re-subscribes to this
Mono sequence if it signals any error, indefinitely. |
Mono<T> |
Mono.retry(long numRetries)
异常重试指定次数
Re-subscribes to this
Mono sequence if it signals any error, for a fixed
number of times. |
Mono<T> |
Mono.retryWhen(Retry retrySpec)
|
static <T> Mono<java.lang.Boolean> |
Mono.sequenceEqual(org.reactivestreams.Publisher<? extends T> source1,
org.reactivestreams.Publisher<? extends T> source2)
两个序列对比
Returns a Mono that emits a Boolean value that indicates whether two Publisher sequences are the
same by comparing the items emitted by each Publisher pairwise.
|
static <T> Mono<java.lang.Boolean> |
Mono.sequenceEqual(org.reactivestreams.Publisher<? extends T> source1,
org.reactivestreams.Publisher<? extends T> source2,
java.util.function.BiPredicate<? super T,? super T> isEqual)
两个序列对比,并需要提供一个元素对比函数
Returns a Mono that emits a Boolean value that indicates whether two Publisher sequences are the
same by comparing the items emitted by each Publisher pairwise based on the results of a specified
equality function.
|
static <T> Mono<java.lang.Boolean> |
Mono.sequenceEqual(org.reactivestreams.Publisher<? extends T> source1,
org.reactivestreams.Publisher<? extends T> source2,
java.util.function.BiPredicate<? super T,? super T> isEqual,
int prefetch)
两个序列对比,并需要提供一个元素对比函数。
|
Mono<T> |
Mono.share()
共享此Mono,其他Subscriber将共享相同的Subscription并因此获得相同的结果。
|
Mono<T> |
Flux.shareNext()
|
Mono<T> |
Mono.single()
期望当前序列恰巧只有一直元素,为空或超过1个元素抛出异常
Expect exactly one item from this
Mono source or signal
NoSuchElementException for an empty source. |
Mono<T> |
Flux.single()
Expect and emit a single item from this
Flux source or signal
NoSuchElementException for an empty source, or
IndexOutOfBoundsException for a source with more than one element. |
Mono<T> |
Flux.single(T defaultValue)
Expect and emit a single item from this
Flux source and emit a default
value for an empty source, but signal an IndexOutOfBoundsException for a
source with more than one element. |
Mono<T> |
Flux.singleOrEmpty()
Expect and emit a single item from this
Flux source, and accept an empty
source but signal an IndexOutOfBoundsException for a source with more than
one element. |
Mono<T> |
Mono.subscribeOn(Scheduler scheduler)
设置订阅者线程池
Run subscribe, onSubscribe and request on a specified
Scheduler 's Scheduler.Worker . |
Mono<T> |
Mono.switchIfEmpty(Mono<? extends T> alternate)
如果当前序列为空则切换到新的序列
Fallback to an alternative
Mono if this mono is completed without data
|
Mono<T> |
Mono.tag(java.lang.String key,
java.lang.String value)
Tag this mono with a key/value pair.
|
Mono<T> |
Mono.take(java.time.Duration duration)
像超时时间,在指定时间没有发布元素则自动完成(返回空Mono)
Give this Mono a chance to resolve within a specified time frame but complete if it
doesn't.
|
Mono<T> |
Mono.take(java.time.Duration duration,
Scheduler timer)
Give this Mono a chance to resolve within a specified time frame but complete if it
doesn't.
|
Mono<T> |
Mono.takeUntilOther(org.reactivestreams.Publisher<?> other)
Give this Mono a chance to resolve before a companion
Publisher emits. |
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 . |
Mono<T> |
Mono.tap(SignalListenerFactory<T,?> listenerFactory)
Tap into Reactive Streams signals emitted or received by this
Mono and notify a stateful per-Subscriber
SignalListener created by the provided SignalListenerFactory . |
Mono<T> |
Mono.tap(java.util.function.Supplier<SignalListener<T>> simpleListenerGenerator)
Tap into Reactive Streams signals emitted or received by this
Mono and notify a stateful per-Subscriber
SignalListener . |
Mono<java.lang.Void> |
ParallelFlux.then()
Emit an onComplete or onError signal once all values across 'rails' have been observed.
|
Mono<java.lang.Void> |
Mono.then()
返回一个
Mono<Void> ,它只重播来自这个 Mono 的完成和异常信号,一般用于执行不关注返回值的下一步任务
Return a Mono<Void> which only replays complete and error signals
from this Mono . |
Mono<java.lang.Void> |
Flux.then()
Return a
Mono<Void> that completes when this Flux completes. |
<V> Mono<V> |
Mono.then(Mono<V> other)
让这个Mono完成然后播放另一个 Mono,异常会重播。
|
<V> Mono<V> |
Flux.then(Mono<V> other)
|
Mono<java.lang.Void> |
Mono.thenEmpty(org.reactivestreams.Publisher<java.lang.Void> other)
只处理业务不关注返回值
Return a
Mono<Void> that waits for this Mono to complete then
for a supplied Publisher<Void> to also complete. |
Mono<java.lang.Void> |
Flux.thenEmpty(org.reactivestreams.Publisher<java.lang.Void> other)
Return a
Mono<Void> that waits for this Flux to complete then
for a supplied Publisher<Void> to also complete. |
<V> Mono<V> |
Mono.thenReturn(V value)
让这个Mono成功完成,然后发出提供的值
Let this
Mono complete successfully, then emit the provided value. |
Mono<Timed<T>> |
Mono.timed()
为这个
Mono Subscriber.onNext(Object) 添加计时事件,封装到一个 Timed 对象中
Times this Mono Subscriber.onNext(Object) event, encapsulated into a Timed object
that lets downstream consumer look at various time information gathered with nanosecond
resolution using the default clock (Schedulers.parallel() ):
Timed.elapsed() : the time in nanoseconds since subscription, as a Duration . |
Mono<Timed<T>> |
Mono.timed(Scheduler clock)
Times this
Mono Subscriber.onNext(Object) event, encapsulated into a Timed object
that lets downstream consumer look at various time information gathered with nanosecond
resolution using the provided Scheduler as a clock:
Timed.elapsed() : the time in nanoseconds since subscription, as a Duration . |
Mono<T> |
Mono.timeout(java.time.Duration timeout)
超时设置。
|
Mono<T> |
Mono.timeout(java.time.Duration timeout,
Mono<? extends T> fallback)
超时设置。
|
Mono<T> |
Mono.timeout(java.time.Duration timeout,
Mono<? extends T> fallback,
Scheduler timer)
超时设置。
|
Mono<T> |
Mono.timeout(java.time.Duration timeout,
Scheduler timer)
设置超时时间和指定检测超时的线程池
Signal a
TimeoutException error in case an item doesn't arrive before the given period,
as measured on the provided Scheduler . |
<U> Mono<T> |
Mono.timeout(org.reactivestreams.Publisher<U> firstTimeout)
发布延迟超时设置,超时传播TimeoutException
Signal a
TimeoutException in case the item from this Mono has
not been emitted before the given Publisher emits. |
<U> Mono<T> |
Mono.timeout(org.reactivestreams.Publisher<U> firstTimeout,
Mono<? extends T> fallback)
如果在给定Publisher发出之前尚未发出来自此Mono的元素,请切换到后备Publisher
Switch to a fallback
Publisher in case the item from this Mono has
not been emitted before the given Publisher emits. |
Mono<Tuple2<java.lang.Long,T>> |
Mono.timestamp()
|
Mono<Tuple2<java.lang.Long,T>> |
Mono.timestamp(Scheduler scheduler)
|
<V> Mono<V> |
Mono.transform(java.util.function.Function<? super Mono<T>,? extends org.reactivestreams.Publisher<V>> transformer)
|
<V> Mono<V> |
Mono.transformDeferred(java.util.function.Function<? super Mono<T>,? 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)
|
static <T,D> Mono<T> |
Mono.using(java.util.concurrent.Callable<? extends D> resourceSupplier,
java.util.function.Function<? super D,? extends Mono<? extends T>> sourceSupplier,
java.util.function.Consumer<? super D> resourceCleanup)
主要将一个资源使用工厂方法方式为每个订阅者生成资源,第一个参数在订阅时创建资源,第二个参数 一个Mono工厂创建 Mono,
第三个参数 资源清理方法
Uses a resource, generated by a supplier for each individual Subscriber, while streaming the value from a
Mono derived from the same resource and makes sure the resource is released if the
sequence terminates or the Subscriber cancels.
|
static <T,D> Mono<T> |
Mono.using(java.util.concurrent.Callable<? extends D> resourceSupplier,
java.util.function.Function<? super D,? extends Mono<? extends T>> sourceSupplier,
java.util.function.Consumer<? super D> resourceCleanup,
boolean eager)
Uses a resource, generated by a supplier for each individual Subscriber, while streaming the value from a
Mono derived from the same resource and makes sure the resource is released if the
sequence terminates or the Subscriber cancels.
|
static <T,D> Mono<T> |
Mono.usingWhen(org.reactivestreams.Publisher<D> resourceSupplier,
java.util.function.Function<? super D,? extends Mono<? extends T>> resourceClosure,
java.util.function.Function<? super D,? extends org.reactivestreams.Publisher<?>> asyncCleanup)
|
static <T,D> Mono<T> |
Mono.usingWhen(org.reactivestreams.Publisher<D> resourceSupplier,
java.util.function.Function<? super D,? extends Mono<? extends T>> resourceClosure,
java.util.function.Function<? super D,? extends org.reactivestreams.Publisher<?>> asyncComplete,
java.util.function.BiFunction<? super D,? super java.lang.Throwable,? extends org.reactivestreams.Publisher<?>> asyncError,
java.util.function.Function<? super D,? extends org.reactivestreams.Publisher<?>> asyncCancel)
工厂方法模式创建一个Mono
Uses a resource, generated by a
Publisher for each individual Subscriber ,
to derive a Mono .Note that all steps of the operator chain that would need the
resource to be in an open stable state need to be described inside the resourceClosure
Function . |
static Mono<java.lang.Void> |
Mono.when(java.lang.Iterable<? extends org.reactivestreams.Publisher<?>> sources)
迭代器方式聚合多个源,如果出现异常则发送发到返回的Mono中
Aggregate given publishers into a new Mono that will be
fulfilled when all of the given Publishers have completed.
|
static Mono<java.lang.Void> |
Mono.when(org.reactivestreams.Publisher<?>... sources)
聚合多个源,如果出现异常则发送发到返回的Mono中
Aggregate given publishers into a new Mono that will be fulfilled
when all of the given sources have completed.
|
static Mono<java.lang.Void> |
Mono.whenDelayError(java.lang.Iterable<? extends org.reactivestreams.Publisher<?>> sources)
将给定的发布者聚合到一个新的 Mono 中,当所有给定的源都完成时,它将被实现。
|
static Mono<java.lang.Void> |
Mono.whenDelayError(org.reactivestreams.Publisher<?>... sources)
将给定的发布者聚合到一个新的 Mono 中,当所有给定的源都完成时,它将被实现。
|
static <R> Mono<R> |
Mono.zip(java.util.function.Function<? super java.lang.Object[],? extends R> combinator,
Mono<?>... monos)
Aggregate given monos into a new Mono that will be fulfilled when all of the given Monos have produced an item, aggregating their values according to the provided combinator function.
|
static <R> Mono<R> |
Mono.zip(java.lang.Iterable<? extends Mono<?>> monos,
java.util.function.Function<? super java.lang.Object[],? extends R> combinator)
Aggregate given monos into a new Mono that will be fulfilled when all of the given Monos have produced an item, aggregating their values according to the provided combinator function.
|
static <T1,T2> Mono<Tuple2<T1,T2>> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2)
多个源压缩到一起,等待所有源发出一个元素之后,完成这些源并对返回元素使用元组进行组合。
|
static <T1,T2,O> Mono<O> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
java.util.function.BiFunction<? super T1,? super T2,? extends O> combinator)
多个源压缩到一起,等待所有源发出一个元素之后,完成这些源并对返回元素使用元组进行组合。
|
static <T1,T2,T3> Mono<Tuple3<T1,T2,T3>> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple3 . |
static <T1,T2,T3,T4> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple4 . |
static <T1,T2,T3,T4,T5> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple5 . |
static <T1,T2,T3,T4,T5,T6> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple6 . |
static <T1,T2,T3,T4,T5,T6,T7> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple7 . |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 . |
static <R> Mono<R> |
Mono.zipDelayError(java.util.function.Function<? super java.lang.Object[],? extends R> combinator,
Mono<?>... monos)
Merge given monos into a new Mono that will be fulfilled when all of the
given Monos have produced an item, aggregating their values according to
the provided combinator function and delaying errors.
|
static <R> Mono<R> |
Mono.zipDelayError(java.lang.Iterable<? extends Mono<?>> monos,
java.util.function.Function<? super java.lang.Object[],? extends R> combinator)
Aggregate given monos into a new Mono that will be fulfilled when all of the given Monos have produced an item.
|
static <T1,T2> Mono<Tuple2<T1,T2>> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2)
将给定的 monos 合并到一个新的 Mono 中,当所有给定的 Monos 都产生了一个元素时,它将完成,将它们的值聚合到一个Tuple2并延迟错误。
|
static <T1,T2,T3> Mono<Tuple3<T1,T2,T3>> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3)
Merge given monos into a new Mono that will be fulfilled when all of the given Mono Monos
have produced an item, aggregating their values into a
Tuple3 and delaying errors. |
static <T1,T2,T3,T4> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple4 and delaying errors. |
static <T1,T2,T3,T4,T5> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple5 and delaying errors. |
static <T1,T2,T3,T4,T5,T6> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple6 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple7 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 and delaying errors. |
<T2> Mono<Tuple2<T,T2>> |
Mono.zipWhen(java.util.function.Function<T,Mono<? extends T2>> rightGenerator)
Wait for the result from this mono, use it to create a second mono via the
provided
rightGenerator function and combine both results into a Tuple2 . |
<T2,O> Mono<O> |
Mono.zipWhen(java.util.function.Function<T,Mono<? extends T2>> rightGenerator,
java.util.function.BiFunction<T,T2,O> combinator)
Wait for the result from this mono, use it to create a second mono via the
provided
rightGenerator function and combine both results into an arbitrary
O object, as defined by the provided combinator function. |
<T2> Mono<Tuple2<T,T2>> |
Mono.zipWith(Mono<? extends T2> other)
Combine the result from this mono and another into a
Tuple2 . |
<T2,O> Mono<O> |
Mono.zipWith(Mono<? extends T2> other,
java.util.function.BiFunction<? super T,? super T2,? extends O> combinator)
Combine the result from this mono and another into an arbitrary
O object,
as defined by the provided combinator function. |
限定符和类型 | 方法和说明 |
---|---|
void |
FluxUsingWhenTest.contextPropagationOnCommit(Mono<java.lang.String> source) |
void |
FluxUsingWhenTest.contextPropagationOnRollback(Mono<java.lang.String> source) |
static <T> Mono<T> |
Mono.first(Mono<? extends T>... monos)
已过时。
use
firstWithSignal(Mono[]) . To be removed in reactor 3.5. |
static <T> Mono<T> |
Mono.firstWithSignal(Mono<? extends T>... monos)
给定一个不定长的Mono列表,如果第一个异常则处理第二个,返回第一个执行完成的Mono
Pick the first
Mono to emit any signal (value, empty completion or error)
and replay that signal, effectively behaving like the fastest of these competing
sources. |
static <T> Mono<T> |
Mono.firstWithValue(Mono<? extends T> first,
Mono<? extends T>... others)
给定一批Mono,处理第一个有元素的Mono。
|
static <T> Mono<T> |
Mono.firstWithValue(Mono<? extends T> first,
Mono<? extends T>... others)
给定一批Mono,处理第一个有元素的Mono。
|
Mono<T> |
Mono.or(Mono<? extends T> other)
从当前Mono或给定的另一个Mono发布一个可用的元素
Emit the first available signal from this mono or the other mono.
|
Mono<T> |
Mono.switchIfEmpty(Mono<? extends T> alternate)
如果当前序列为空则切换到新的序列
Fallback to an alternative
Mono if this mono is completed without data
|
<V> Mono<V> |
Mono.then(Mono<V> other)
让这个Mono完成然后播放另一个 Mono,异常会重播。
|
<V> Mono<V> |
Flux.then(Mono<V> other)
|
Mono<T> |
Mono.timeout(java.time.Duration timeout,
Mono<? extends T> fallback)
超时设置。
|
Mono<T> |
Mono.timeout(java.time.Duration timeout,
Mono<? extends T> fallback,
Scheduler timer)
超时设置。
|
<U> Mono<T> |
Mono.timeout(org.reactivestreams.Publisher<U> firstTimeout,
Mono<? extends T> fallback)
如果在给定Publisher发出之前尚未发出来自此Mono的元素,请切换到后备Publisher
Switch to a fallback
Publisher in case the item from this Mono has
not been emitted before the given Publisher emits. |
static <R> Mono<R> |
Mono.zip(java.util.function.Function<? super java.lang.Object[],? extends R> combinator,
Mono<?>... monos)
Aggregate given monos into a new Mono that will be fulfilled when all of the given Monos have produced an item, aggregating their values according to the provided combinator function.
|
static <T1,T2> Mono<Tuple2<T1,T2>> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2)
多个源压缩到一起,等待所有源发出一个元素之后,完成这些源并对返回元素使用元组进行组合。
|
static <T1,T2> Mono<Tuple2<T1,T2>> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2)
多个源压缩到一起,等待所有源发出一个元素之后,完成这些源并对返回元素使用元组进行组合。
|
static <T1,T2,O> Mono<O> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
java.util.function.BiFunction<? super T1,? super T2,? extends O> combinator)
多个源压缩到一起,等待所有源发出一个元素之后,完成这些源并对返回元素使用元组进行组合。
|
static <T1,T2,O> Mono<O> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
java.util.function.BiFunction<? super T1,? super T2,? extends O> combinator)
多个源压缩到一起,等待所有源发出一个元素之后,完成这些源并对返回元素使用元组进行组合。
|
static <T1,T2,T3> Mono<Tuple3<T1,T2,T3>> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple3 . |
static <T1,T2,T3> Mono<Tuple3<T1,T2,T3>> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple3 . |
static <T1,T2,T3> Mono<Tuple3<T1,T2,T3>> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple3 . |
static <T1,T2,T3,T4> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple4 . |
static <T1,T2,T3,T4> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple4 . |
static <T1,T2,T3,T4> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple4 . |
static <T1,T2,T3,T4> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple4 . |
static <T1,T2,T3,T4,T5> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple5 . |
static <T1,T2,T3,T4,T5> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple5 . |
static <T1,T2,T3,T4,T5> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple5 . |
static <T1,T2,T3,T4,T5> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple5 . |
static <T1,T2,T3,T4,T5> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple5 . |
static <T1,T2,T3,T4,T5,T6> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple6 . |
static <T1,T2,T3,T4,T5,T6> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple6 . |
static <T1,T2,T3,T4,T5,T6> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple6 . |
static <T1,T2,T3,T4,T5,T6> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple6 . |
static <T1,T2,T3,T4,T5,T6> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple6 . |
static <T1,T2,T3,T4,T5,T6> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple6 . |
static <T1,T2,T3,T4,T5,T6,T7> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple7 . |
static <T1,T2,T3,T4,T5,T6,T7> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple7 . |
static <T1,T2,T3,T4,T5,T6,T7> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple7 . |
static <T1,T2,T3,T4,T5,T6,T7> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple7 . |
static <T1,T2,T3,T4,T5,T6,T7> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple7 . |
static <T1,T2,T3,T4,T5,T6,T7> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple7 . |
static <T1,T2,T3,T4,T5,T6,T7> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple7 . |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 . |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 . |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 . |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 . |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 . |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 . |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 . |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zip(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 . |
static <R> Mono<R> |
Mono.zipDelayError(java.util.function.Function<? super java.lang.Object[],? extends R> combinator,
Mono<?>... monos)
Merge given monos into a new Mono that will be fulfilled when all of the
given Monos have produced an item, aggregating their values according to
the provided combinator function and delaying errors.
|
static <T1,T2> Mono<Tuple2<T1,T2>> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2)
将给定的 monos 合并到一个新的 Mono 中,当所有给定的 Monos 都产生了一个元素时,它将完成,将它们的值聚合到一个Tuple2并延迟错误。
|
static <T1,T2> Mono<Tuple2<T1,T2>> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2)
将给定的 monos 合并到一个新的 Mono 中,当所有给定的 Monos 都产生了一个元素时,它将完成,将它们的值聚合到一个Tuple2并延迟错误。
|
static <T1,T2,T3> Mono<Tuple3<T1,T2,T3>> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3)
Merge given monos into a new Mono that will be fulfilled when all of the given Mono Monos
have produced an item, aggregating their values into a
Tuple3 and delaying errors. |
static <T1,T2,T3> Mono<Tuple3<T1,T2,T3>> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3)
Merge given monos into a new Mono that will be fulfilled when all of the given Mono Monos
have produced an item, aggregating their values into a
Tuple3 and delaying errors. |
static <T1,T2,T3> Mono<Tuple3<T1,T2,T3>> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3)
Merge given monos into a new Mono that will be fulfilled when all of the given Mono Monos
have produced an item, aggregating their values into a
Tuple3 and delaying errors. |
static <T1,T2,T3,T4> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple4 and delaying errors. |
static <T1,T2,T3,T4> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple4 and delaying errors. |
static <T1,T2,T3,T4> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple4 and delaying errors. |
static <T1,T2,T3,T4> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple4 and delaying errors. |
static <T1,T2,T3,T4,T5> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple5 and delaying errors. |
static <T1,T2,T3,T4,T5> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple5 and delaying errors. |
static <T1,T2,T3,T4,T5> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple5 and delaying errors. |
static <T1,T2,T3,T4,T5> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple5 and delaying errors. |
static <T1,T2,T3,T4,T5> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple5 and delaying errors. |
static <T1,T2,T3,T4,T5,T6> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple6 and delaying errors. |
static <T1,T2,T3,T4,T5,T6> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple6 and delaying errors. |
static <T1,T2,T3,T4,T5,T6> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple6 and delaying errors. |
static <T1,T2,T3,T4,T5,T6> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple6 and delaying errors. |
static <T1,T2,T3,T4,T5,T6> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple6 and delaying errors. |
static <T1,T2,T3,T4,T5,T6> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple6 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple7 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple7 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple7 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple7 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple7 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple7 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple7 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 and delaying errors. |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
Mono.zipDelayError(Mono<? extends T1> p1,
Mono<? extends T2> p2,
Mono<? extends T3> p3,
Mono<? extends T4> p4,
Mono<? extends T5> p5,
Mono<? extends T6> p6,
Mono<? extends T7> p7,
Mono<? extends T8> p8)
Merge given monos into a new Mono that will be fulfilled when all of the given Monos
have produced an item, aggregating their values into a
Tuple8 and delaying errors. |
<T2> Mono<Tuple2<T,T2>> |
Mono.zipWith(Mono<? extends T2> other)
Combine the result from this mono and another into a
Tuple2 . |
<T2,O> Mono<O> |
Mono.zipWith(Mono<? extends T2> other,
java.util.function.BiFunction<? super T,? super T2,? extends O> combinator)
Combine the result from this mono and another into an arbitrary
O object,
as defined by the provided combinator function. |
限定符和类型 | 方法和说明 |
---|---|
<P> P |
Mono.as(java.util.function.Function<? super Mono<T>,P> transformer)
将此Mono转换为目标类型
Transform this
Mono into a target type. |
Mono<T> |
Mono.cacheInvalidateWhen(java.util.function.Function<? super T,Mono<java.lang.Void>> invalidationTriggerGenerator)
自定义控制缓存失效。
|
Mono<T> |
Mono.cacheInvalidateWhen(java.util.function.Function<? super T,Mono<java.lang.Void>> invalidationTriggerGenerator,
java.util.function.Consumer<? super T> onInvalidate)
自定义控制缓存失效且提供一个Consumer处理失效的值
Cache
onNext signal received from the source and replay it to other subscribers,
while allowing invalidation via a Mono<Void> companion trigger generated from the currently
cached value. |
static <T> Mono<T> |
Mono.defer(java.util.function.Supplier<? extends Mono<? extends T>> supplier)
为每个订阅者延迟发布一个元素,在被订阅时在发布者端延迟发布(懒汉式创建,而
just(Object) 则是饿汉式创建)
Create a Mono provider that will supply a target Mono to subscribe to for
each Subscriber downstream. |
static <T> Mono<T> |
Mono.deferContextual(java.util.function.Function<ContextView,? extends Mono<? extends T>> contextualMonoFactory)
获取下游设置的上下文内容,如果存在多层Mono嵌套设置上下文
contextWrite(ContextView) 则取距离最近的上下文
Create a Mono provider that will supply a target Mono
to subscribe to for each Subscriber downstream. |
static <T> Mono<T> |
Mono.first(java.lang.Iterable<? extends Mono<? extends T>> monos)
已过时。
use
firstWithSignal(Iterable) . To be removed in reactor 3.5. |
static <T> Mono<T> |
Mono.firstWithSignal(java.lang.Iterable<? extends Mono<? extends T>> monos)
给定一个Mono列表,如果第一个异常则处理第二个,返回第一个执行完成的Mono
Pick the first
Mono to emit any signal (value, empty completion or error)
and replay that signal, effectively behaving like the fastest of these competing
sources. |
static <T> Mono<T> |
Mono.firstWithValue(java.lang.Iterable<? extends Mono<? extends T>> monos)
用迭代器给定一批Mono,处理第一个有元素的Mono。
|
<R> Mono<R> |
Mono.flatMap(java.util.function.Function<? super T,? extends Mono<? extends R>> transformer)
|
<E extends java.lang.Throwable> |
Mono.onErrorResume(java.lang.Class<E> type,
java.util.function.Function<? super E,? extends Mono<? extends T>> fallback)
当发生与给定类型匹配的错误时进行错误恢复(动态候补值),当上游发生异常进行回调
Subscribe to a fallback publisher when an error matching the given type
occurs, using a function to choose the fallback depending on the error.
|
Mono<T> |
Mono.onErrorResume(java.util.function.Function<? super java.lang.Throwable,? extends Mono<? extends T>> fallback)
错误恢复(动态候补值),当上游发生异常进行回调
Subscribe to a fallback publisher when any error occurs, using a function to
choose the fallback depending on the error.
|
Mono<T> |
Mono.onErrorResume(java.util.function.Predicate<? super java.lang.Throwable> predicate,
java.util.function.Function<? super java.lang.Throwable,? extends Mono<? extends T>> fallback)
当与给定的
Predicate 匹配时,进行错误恢复(动态候补值),当上游发生异常进行回调
Subscribe to a fallback publisher when an error matching a given predicate
occurs. |
<R> Mono<R> |
Mono.publish(java.util.function.Function<? super Mono<T>,? extends Mono<? extends R>> transform)
再次发布
Share a
Mono for the duration of a function that may transform it and
consume it as many times as necessary without causing multiple subscriptions
to the upstream. |
<R> Mono<R> |
Mono.publish(java.util.function.Function<? super Mono<T>,? extends Mono<? extends R>> transform)
再次发布
Share a
Mono for the duration of a function that may transform it and
consume it as many times as necessary without causing multiple subscriptions
to the upstream. |
<V> Mono<V> |
Mono.transform(java.util.function.Function<? super Mono<T>,? extends org.reactivestreams.Publisher<V>> transformer)
|
<V> Mono<V> |
Mono.transformDeferred(java.util.function.Function<? super Mono<T>,? 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)
|
static <T,D> Mono<T> |
Mono.using(java.util.concurrent.Callable<? extends D> resourceSupplier,
java.util.function.Function<? super D,? extends Mono<? extends T>> sourceSupplier,
java.util.function.Consumer<? super D> resourceCleanup)
主要将一个资源使用工厂方法方式为每个订阅者生成资源,第一个参数在订阅时创建资源,第二个参数 一个Mono工厂创建 Mono,
第三个参数 资源清理方法
Uses a resource, generated by a supplier for each individual Subscriber, while streaming the value from a
Mono derived from the same resource and makes sure the resource is released if the
sequence terminates or the Subscriber cancels.
|
static <T,D> Mono<T> |
Mono.using(java.util.concurrent.Callable<? extends D> resourceSupplier,
java.util.function.Function<? super D,? extends Mono<? extends T>> sourceSupplier,
java.util.function.Consumer<? super D> resourceCleanup,
boolean eager)
Uses a resource, generated by a supplier for each individual Subscriber, while streaming the value from a
Mono derived from the same resource and makes sure the resource is released if the
sequence terminates or the Subscriber cancels.
|
static <T,D> Mono<T> |
Mono.usingWhen(org.reactivestreams.Publisher<D> resourceSupplier,
java.util.function.Function<? super D,? extends Mono<? extends T>> resourceClosure,
java.util.function.Function<? super D,? extends org.reactivestreams.Publisher<?>> asyncCleanup)
|
static <T,D> Mono<T> |
Mono.usingWhen(org.reactivestreams.Publisher<D> resourceSupplier,
java.util.function.Function<? super D,? extends Mono<? extends T>> resourceClosure,
java.util.function.Function<? super D,? extends org.reactivestreams.Publisher<?>> asyncComplete,
java.util.function.BiFunction<? super D,? super java.lang.Throwable,? extends org.reactivestreams.Publisher<?>> asyncError,
java.util.function.Function<? super D,? extends org.reactivestreams.Publisher<?>> asyncCancel)
工厂方法模式创建一个Mono
Uses a resource, generated by a
Publisher for each individual Subscriber ,
to derive a Mono .Note that all steps of the operator chain that would need the
resource to be in an open stable state need to be described inside the resourceClosure
Function . |
static <R> Mono<R> |
Mono.zip(java.lang.Iterable<? extends Mono<?>> monos,
java.util.function.Function<? super java.lang.Object[],? extends R> combinator)
Aggregate given monos into a new Mono that will be fulfilled when all of the given Monos have produced an item, aggregating their values according to the provided combinator function.
|
static <R> Mono<R> |
Mono.zipDelayError(java.lang.Iterable<? extends Mono<?>> monos,
java.util.function.Function<? super java.lang.Object[],? extends R> combinator)
Aggregate given monos into a new Mono that will be fulfilled when all of the given Monos have produced an item.
|
<T2> Mono<Tuple2<T,T2>> |
Mono.zipWhen(java.util.function.Function<T,Mono<? extends T2>> rightGenerator)
Wait for the result from this mono, use it to create a second mono via the
provided
rightGenerator function and combine both results into a Tuple2 . |
<T2,O> Mono<O> |
Mono.zipWhen(java.util.function.Function<T,Mono<? extends T2>> rightGenerator,
java.util.function.BiFunction<T,T2,O> combinator)
Wait for the result from this mono, use it to create a second mono via the
provided
rightGenerator function and combine both results into an arbitrary
O object, as defined by the provided combinator function. |
限定符和类型 | 方法和说明 |
---|---|
default Mono<java.lang.Void> |
Scheduler.disposeGracefully()
Lazy variant of
Scheduler.dispose() that also allows for graceful cleanup
of underlying resources. |
限定符和类型 | 字段和说明 |
---|---|
Mono<java.lang.String> |
GuideTests.toDebug |
限定符和类型 | 方法和说明 |
---|---|
Mono<java.lang.Void> |
GuideTests.processOrFallback(Mono<java.lang.String> commandSource,
Mono<java.lang.Void> doWhenEmpty) |
限定符和类型 | 方法和说明 |
---|---|
Mono<java.lang.Void> |
GuideTests.processOrFallback(Mono<java.lang.String> commandSource,
Mono<java.lang.Void> doWhenEmpty) |
Mono<java.lang.Void> |
GuideTests.processOrFallback(Mono<java.lang.String> commandSource,
Mono<java.lang.Void> doWhenEmpty) |
Flux<java.lang.String> |
GuideTests.processOrFallback(Mono<java.lang.String> source,
org.reactivestreams.Publisher<java.lang.String> fallback) |
限定符和类型 | 方法和说明 |
---|---|
abstract Mono<T> |
TestPublisher.mono()
Convenience method to wrap this
TestPublisher to a Mono . |
Mono<T> |
PublisherProbe.mono()
Return a
Mono version of the probe. |
Mono<T> |
PublisherProbe.DefaultPublisherProbe.mono() |
限定符和类型 | 方法和说明 |
---|---|
ReduceOperatorTest.Scenario<I,O> |
ReduceOperatorTest.Scenario.applyAllOptions(OperatorScenario<I,Flux<I>,O,Mono<O>> source) |
MonoOperatorTest.Scenario<I,O> |
MonoOperatorTest.Scenario.applyAllOptions(OperatorScenario<I,Mono<I>,O,Mono<O>> source) |
MonoOperatorTest.Scenario<I,O> |
MonoOperatorTest.Scenario.applyAllOptions(OperatorScenario<I,Mono<I>,O,Mono<O>> source) |
ReduceOperatorTest.Scenario<I,O> |
ReduceOperatorTest.scenario(java.util.function.Function<Flux<I>,? extends Mono<O>> scenario) |
MonoOperatorTest.Scenario<I,O> |
MonoOperatorTest.scenario(java.util.function.Function<Mono<I>,? extends Mono<O>> scenario) |
MonoOperatorTest.Scenario<I,O> |
MonoOperatorTest.scenario(java.util.function.Function<Mono<I>,? extends Mono<O>> scenario) |
限定符和类型 | 方法和说明 |
---|---|
RetrySpec |
RetrySpec.doAfterRetryAsync(java.util.function.Function<Retry.RetrySignal,Mono<java.lang.Void>> doAsyncAfterRetry)
Add asynchronous behavior to be executed after the current retry trigger in the companion publisher,
thus delaying the resulting retry trigger with the additional
Mono . |
RetryBackoffSpec |
RetryBackoffSpec.doAfterRetryAsync(java.util.function.Function<Retry.RetrySignal,Mono<java.lang.Void>> doAsyncAfterRetry)
Add asynchronous behavior to be executed after the current retry trigger in the companion publisher,
thus delaying the resulting retry trigger with the additional
Mono . |
RetrySpec |
RetrySpec.doBeforeRetryAsync(java.util.function.Function<Retry.RetrySignal,Mono<java.lang.Void>> doAsyncBeforeRetry)
Add asynchronous behavior to be executed before the current retry trigger in the companion publisher,
thus delaying the resulting retry trigger with the additional
Mono . |
RetryBackoffSpec |
RetryBackoffSpec.doBeforeRetryAsync(java.util.function.Function<Retry.RetrySignal,Mono<java.lang.Void>> doAsyncBeforeRetry)
Add asynchronous behavior to be executed before the current retry trigger in the companion publisher,
thus delaying the resulting retry trigger with the additional
Mono . |