本文整理了Java中reactor.core.publisher.Flux.countingBooleanSupplier()
方法的一些代码示例,展示了Flux.countingBooleanSupplier()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flux.countingBooleanSupplier()
方法的具体详情如下:
包路径:reactor.core.publisher.Flux
类名称:Flux
方法名:countingBooleanSupplier
暂无
代码示例来源:origin: reactor/reactor-core
/**
* Repeatedly subscribe to the source if the predicate returns true after completion of the previous
* subscription. A specified maximum of repeat will limit the number of re-subscribe.
*
* <p>
* <img class="marble" src="doc-files/marbles/repeatWithAttemptsAndPredicateForFlux.svg" alt="">
*
* @param numRepeat the number of times to re-subscribe on complete (positive, or 0 for original sequence only)
* @param predicate the boolean to evaluate on onComplete
*
* @return a {@link Flux} that repeats on onComplete while the predicate matches,
* up to the specified number of repetitions
*/
public final Flux<T> repeat(long numRepeat, BooleanSupplier predicate) {
if (numRepeat < 0L) {
throw new IllegalArgumentException("numRepeat >= 0 required");
}
if (numRepeat == 0) {
return this;
}
return defer( () -> repeat(countingBooleanSupplier(predicate, numRepeat)));
}
代码示例来源:origin: reactor/reactor-core
/**
* Repeatedly subscribe to the source if the predicate returns true after completion of the previous
* subscription. A specified maximum of repeat will limit the number of re-subscribe.
*
* <p>
* <img class="marble" src="doc-files/marbles/repeatWithAttemptsAndPredicateForMono.svg" alt="">
*
* @param numRepeat the number of times to re-subscribe on complete (positive, or 0 for original sequence only)
* @param predicate the boolean to evaluate on onComplete
*
* @return a {@link Flux} that repeats on onComplete while the predicate matches,
* up to the specified number of repetitions
*/
public final Flux<T> repeat(long numRepeat, BooleanSupplier predicate) {
if (numRepeat < 0L) {
throw new IllegalArgumentException("numRepeat >= 0 required");
}
if (numRepeat == 0) {
return this.flux();
}
return Flux.defer(() -> repeat(Flux.countingBooleanSupplier(predicate, numRepeat)));
}
代码示例来源:origin: io.projectreactor/reactor-core
/**
* Repeatedly subscribe to the source if the predicate returns true after completion of the previous
* subscription. A specified maximum of repeat will limit the number of re-subscribe.
*
* <p>
* <img class="marble" src="doc-files/marbles/repeatWithAttemptsAndPredicateForFlux.svg" alt="">
*
* @param numRepeat the number of times to re-subscribe on complete (positive, or 0 for original sequence only)
* @param predicate the boolean to evaluate on onComplete
*
* @return a {@link Flux} that repeats on onComplete while the predicate matches,
* up to the specified number of repetitions
*/
public final Flux<T> repeat(long numRepeat, BooleanSupplier predicate) {
if (numRepeat < 0L) {
throw new IllegalArgumentException("numRepeat >= 0 required");
}
if (numRepeat == 0) {
return this;
}
return defer( () -> repeat(countingBooleanSupplier(predicate, numRepeat)));
}
代码示例来源:origin: io.projectreactor/reactor-core
/**
* Repeatedly subscribe to the source if the predicate returns true after completion of the previous
* subscription. A specified maximum of repeat will limit the number of re-subscribe.
*
* <p>
* <img class="marble" src="doc-files/marbles/repeatWithAttemptsAndPredicateForMono.svg" alt="">
*
* @param numRepeat the number of times to re-subscribe on complete (positive, or 0 for original sequence only)
* @param predicate the boolean to evaluate on onComplete
*
* @return a {@link Flux} that repeats on onComplete while the predicate matches,
* up to the specified number of repetitions
*/
public final Flux<T> repeat(long numRepeat, BooleanSupplier predicate) {
if (numRepeat < 0L) {
throw new IllegalArgumentException("numRepeat >= 0 required");
}
if (numRepeat == 0) {
return this.flux();
}
return Flux.defer(() -> repeat(Flux.countingBooleanSupplier(predicate, numRepeat)));
}
内容来源于网络,如有侵权,请联系作者删除!