reactor.core.publisher.Flux.countingBooleanSupplier()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(181)

本文整理了Java中reactor.core.publisher.Flux.countingBooleanSupplier()方法的一些代码示例,展示了Flux.countingBooleanSupplier()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flux.countingBooleanSupplier()方法的具体详情如下:
包路径:reactor.core.publisher.Flux
类名称:Flux
方法名:countingBooleanSupplier

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)));
}

相关文章

Flux类方法