Interface ReactiveStreamsConnectionOperations<C>

Type Parameters:
C - The connection type
All Known Subinterfaces:
MongoReactiveStreamsConnectionOperations, MongoReactorConnectionOperations, ReactorConnectionOperations<C>
All Known Implementing Classes:
AbstractReactorConnectionOperations, DefaultR2dbcReactorConnectionOperations

public interface ReactiveStreamsConnectionOperations<C>
An interface fo reactive connection management.
Since:
4.0.0
Author:
Denis Stepanov
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> @NonNull org.reactivestreams.Publisher<T>
    withConnection(@NonNull ConnectionDefinition definition, @NonNull Function<ConnectionStatus<C>,org.reactivestreams.Publisher<T>> handler)
    Execute the given handler with a new connection.
    default <T> @NonNull org.reactivestreams.Publisher<T>
    withConnection(@NonNull Function<ConnectionStatus<C>,org.reactivestreams.Publisher<T>> handler)
    Execute the given handler with a new connection.
  • Method Details

    • withConnection

      @NonNull <T> @NonNull org.reactivestreams.Publisher<T> withConnection(@NonNull @NonNull ConnectionDefinition definition, @NonNull @NonNull Function<ConnectionStatus<C>,org.reactivestreams.Publisher<T>> handler)
      Execute the given handler with a new connection.
      Type Parameters:
      T - The emitted type
      Parameters:
      definition - The definition
      handler - The handler
      Returns:
      A publisher that emits the result type
    • withConnection

      @NonNull default <T> @NonNull org.reactivestreams.Publisher<T> withConnection(@NonNull @NonNull Function<ConnectionStatus<C>,org.reactivestreams.Publisher<T>> handler)
      Execute the given handler with a new connection.
      Type Parameters:
      T - The emitted type
      Parameters:
      handler - The handler
      Returns:
      A publisher that emits the result type