Java Code Examples for reactor.core.publisher.Hooks#resetOnEachOperator()
The following examples show how to use
reactor.core.publisher.Hooks#resetOnEachOperator() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ReactorTestExecutionListener.java From reactor-core with Apache License 2.0 | 6 votes |
public static void reset() { Hooks.resetOnOperatorDebug(); Hooks.resetOnEachOperator(); Hooks.resetOnLastOperator(); Hooks.resetOnErrorDropped(); Hooks.resetOnNextDropped(); Hooks.resetOnNextError(); Hooks.resetOnOperatorError(); Schedulers.resetOnHandleError(); Schedulers.resetFactory(); Schedulers.resetOnScheduleHooks(); // TODO capture non-default schedulers and shutdown them }
Example 2
Source File: TraceReactorAutoConfiguration.java From spring-cloud-sleuth with Apache License 2.0 | 6 votes |
@PreDestroy public void cleanupHooks() { if (log.isTraceEnabled()) { log.trace("Cleaning up hooks"); } SleuthReactorProperties reactorProperties = this.springContext .getBean(SleuthReactorProperties.class); if (reactorProperties.isDecorateOnEach()) { if (log.isTraceEnabled()) { log.trace("Resetting onEach operator instrumentation"); } Hooks.resetOnEachOperator(SLEUTH_TRACE_REACTOR_KEY); } else { if (log.isTraceEnabled()) { log.trace("Resetting onLast operator instrumentation"); } Hooks.resetOnLastOperator(SLEUTH_TRACE_REACTOR_KEY); } Schedulers .removeExecutorServiceDecorator(SLEUTH_REACTOR_EXECUTOR_SERVICE_KEY); }
Example 3
Source File: TraceReactorAutoConfiguration.java From spring-cloud-sleuth with Apache License 2.0 | 6 votes |
@Override public void onApplicationEvent(RefreshScopeRefreshedEvent event) { if (log.isDebugEnabled()) { log.debug("Context refreshed, will reset hooks and then re-register them"); } Hooks.resetOnEachOperator(SLEUTH_TRACE_REACTOR_KEY); Hooks.resetOnLastOperator(SLEUTH_TRACE_REACTOR_KEY); if (this.reactorProperties.isDecorateOnEach()) { if (log.isTraceEnabled()) { log.trace("Decorating onEach operator instrumentation"); } Hooks.onEachOperator(SLEUTH_TRACE_REACTOR_KEY, scopePassingSpanOperator(this.context)); } else { if (log.isTraceEnabled()) { log.trace("Decorating onLast operator instrumentation"); } Hooks.onLastOperator(SLEUTH_TRACE_REACTOR_KEY, scopePassingSpanOperator(this.context)); } }
Example 4
Source File: TraceReactorAutoConfigurationAccessorConfiguration.java From spring-cloud-sleuth with Apache License 2.0 | 5 votes |
public static void close() { if (log.isTraceEnabled()) { log.trace("Cleaning up hooks"); } Hooks.resetOnEachOperator(SLEUTH_TRACE_REACTOR_KEY); Hooks.resetOnLastOperator(SLEUTH_TRACE_REACTOR_KEY); Schedulers.removeExecutorServiceDecorator(SLEUTH_REACTOR_EXECUTOR_SERVICE_KEY); }
Example 5
Source File: ScopePassingSpanSubscriberTests.java From spring-cloud-sleuth with Apache License 2.0 | 5 votes |
@Before public void resetHooks() { // There's an assumption some other test is leaking hooks, so we clear them all to // prevent should_not_scope_scalar_subscribe from being interfered with. Hooks.resetOnEachOperator(SLEUTH_TRACE_REACTOR_KEY); Hooks.resetOnLastOperator(SLEUTH_TRACE_REACTOR_KEY); Schedulers.removeExecutorServiceDecorator(SLEUTH_REACTOR_EXECUTOR_SERVICE_KEY); }
Example 6
Source File: TraceReactorAutoConfigurationAccessorConfiguration.java From spring-cloud-sleuth with Apache License 2.0 | 5 votes |
public static void close() { if (log.isTraceEnabled()) { log.trace("Cleaning up hooks"); } Hooks.resetOnEachOperator(SLEUTH_TRACE_REACTOR_KEY); Hooks.resetOnLastOperator(SLEUTH_TRACE_REACTOR_KEY); Schedulers.removeExecutorServiceDecorator(SLEUTH_REACTOR_EXECUTOR_SERVICE_KEY); }
Example 7
Source File: ReactorTracingAutoConfiguration.java From java-spring-cloud with Apache License 2.0 | 4 votes |
@PreDestroy public void cleanupHooks() { Hooks.resetOnEachOperator(HOOK_KEY); Schedulers.removeExecutorServiceDecorator(EXECUTOR_SERVICE_DECORATOR_KEY); }
Example 8
Source File: MonoTests.java From reactor-core with Apache License 2.0 | 4 votes |
@After public void resetHooks() { Hooks.resetOnEachOperator(); Hooks.resetOnLastOperator(); }
Example 9
Source File: HttpClientBeanPostProcessorTest.java From spring-cloud-sleuth with Apache License 2.0 | 4 votes |
@BeforeEach public void setup() { Hooks.resetOnEachOperator(); Hooks.resetOnLastOperator(); Schedulers.resetOnScheduleHooks(); }
Example 10
Source File: FlowsScopePassingSpanSubscriberTests.java From spring-cloud-sleuth with Apache License 2.0 | 4 votes |
@BeforeEach public void setup() { Hooks.resetOnEachOperator(SLEUTH_TRACE_REACTOR_KEY); Hooks.resetOnLastOperator(SLEUTH_TRACE_REACTOR_KEY); Schedulers.resetOnScheduleHooks(); }