本文整理了Java中reactor.core.publisher.Mono.ignoreElements()
方法的一些代码示例,展示了Mono.ignoreElements()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mono.ignoreElements()
方法的具体详情如下:
包路径:reactor.core.publisher.Mono
类名称:Mono
方法名:ignoreElements
[英]Create a new Mono that ignores elements from the source (dropping them), but completes when the source completes.
[中]创建一个新的Mono,忽略源中的元素(删除它们),但在源完成时完成。
代码示例来源:origin: reactor/reactor-core
static <T> Mono<Void> empty(Publisher<T> source) {
@SuppressWarnings("unchecked")
Mono<Void> then = (Mono<Void>)ignoreElements(source);
return then;
}
代码示例来源:origin: reactor/reactor-core
/**
* Returns a new instance which has the additional source to be merged together with
* the current array of sources.
* <p>
* This operation doesn't change the current FluxMerge instance.
*
* @param source the new source to merge with the others
* @return the new FluxConcatArray instance
*/
@SuppressWarnings("unchecked")
<V> FluxConcatArray<V> concatAdditionalIgnoredLast(Publisher<? extends V>
source) {
int n = array.length;
Publisher<? extends V>[] newArray = new Publisher[n + 1];
//noinspection SuspiciousSystemArraycopy
System.arraycopy(array, 0, newArray, 0, n);
newArray[n - 1] = Mono.ignoreElements(newArray[n - 1]);
newArray[n] = source;
return new FluxConcatArray<>(delayError, newArray);
}
代码示例来源:origin: io.projectreactor/reactor-core
static <T> Mono<Void> empty(Publisher<T> source) {
@SuppressWarnings("unchecked")
Mono<Void> then = (Mono<Void>)ignoreElements(source);
return then;
}
代码示例来源:origin: io.projectreactor/reactor-core
/**
* Returns a new instance which has the additional source to be merged together with
* the current array of sources.
* <p>
* This operation doesn't change the current FluxMerge instance.
*
* @param source the new source to merge with the others
* @return the new FluxConcatArray instance
*/
@SuppressWarnings("unchecked")
<V> FluxConcatArray<V> concatAdditionalIgnoredLast(Publisher<? extends V>
source) {
int n = array.length;
Publisher<? extends V>[] newArray = new Publisher[n + 1];
//noinspection SuspiciousSystemArraycopy
System.arraycopy(array, 0, newArray, 0, n);
newArray[n - 1] = Mono.ignoreElements(newArray[n - 1]);
newArray[n] = source;
return new FluxConcatArray<>(delayError, newArray);
}
内容来源于网络,如有侵权,请联系作者删除!