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

x33g5p2x  于2022-01-25 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(109)

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

Operators.drainSubscriber介绍

[英]Return a singleton Subscriber that does not check for double onSubscribe and purely request Long.MAX. If an error is received it will raise a Exceptions#errorCallbackNotImplemented(Throwable) in the receiving thread.
[中]返回不检查double onSubscribe和纯请求Long的singleton订户。最大值。如果收到错误,它将在接收线程中引发异常#errorCallbackNotImplemented(Throwable)。

代码示例

代码示例来源:origin: reactor/reactor-core

final void inputFusedOutputConditionalState(OperatorScenario<I, PI, O, PO> scenario) {
  this.fluxFuseableAsyncState(scenario, true)
    .subscribe(Operators.drainSubscriber());
}

代码示例来源:origin: reactor/reactor-core

final void inputFusedOutputState(OperatorScenario<I, PI, O, PO> scenario) {
  this.fluxFuseableAsyncState(scenario, false)
    .subscribe(Operators.drainSubscriber());
}

代码示例来源:origin: reactor/reactor-core

@SuppressWarnings("unchecked")
final void inputHiddenOutputState(OperatorScenario<I, PI, O, PO> scenario) {
  this.fluxState(scenario, false)
    .subscribe(Operators.drainSubscriber());
}

代码示例来源:origin: reactor/reactor-core

final void inputHiddenOutputConditionalState(OperatorScenario<I, PI, O, PO> scenario) {
  this.fluxState(scenario, true)
    .subscribe(Operators.drainSubscriber());
}

代码示例来源:origin: reactor/reactor-core

});
Flux.from(s -> {
  assertThat(s).isEqualTo(Operators.drainSubscriber());
  s.onSubscribe(new Subscription() {
    @Override
  .subscribe(Operators.drainSubscriber());

代码示例来源:origin: rsocket/rsocket-java

@DisplayName("onClose gathers metrics")
@Test
void onClose() {
 when(delegate.onClose()).thenReturn(Mono.empty());
 new MicrometerDuplexConnection(
     CLIENT, delegate, meterRegistry, Tag.of("test-key", "test-value"))
   .onClose()
   .subscribe(Operators.drainSubscriber());
 assertThat(
     meterRegistry
       .get("rsocket.duplex.connection.close")
       .tag("connection.type", CLIENT.name())
       .tag("test-key", "test-value")
       .counter()
       .count())
   .isEqualTo(1);
}

相关文章