Interface ReactorConnectionOperations<C>

Type Parameters:
C - The connection
All Superinterfaces:
ReactiveStreamsConnectionOperations<C>
All Known Implementing Classes:
AbstractReactorConnectionOperations, DefaultR2dbcReactorConnectionOperations

public interface ReactorConnectionOperations<C> extends ReactiveStreamsConnectionOperations<C>
Special version of ReactiveStreamsConnectionOperations that is exposing Reactor publishers.
Since:
4.0.0
Author:
Denis Stepanov
  • Method Details

    • getConnectionStatus

      @NonNull default @NonNull ConnectionStatus<C> getConnectionStatus(@NonNull @NonNull reactor.util.context.ContextView contextView)
      Obtains the current required connection.
      Parameters:
      contextView - The reactor's context view
      Returns:
      The connection or exception if the connection doesn't exist
    • findConnectionStatus

      Optional<ConnectionStatus<C>> findConnectionStatus(@NonNull @NonNull reactor.util.context.ContextView contextView)
      Obtains the current connection.
      Parameters:
      contextView - The reactor's context view
      Returns:
      The optional connection
    • withConnectionFlux

      @NonNull default <T> @NonNull reactor.core.publisher.Flux<T> withConnectionFlux(@NonNull @NonNull ConnectionDefinition definition, @NonNull @NonNull Function<ConnectionStatus<C>,reactor.core.publisher.Flux<T>> handler)
      Execute the given handler with a new transaction.
      Type Parameters:
      T - The emitted type
      Parameters:
      definition - The definition
      handler - The handler
      Returns:
      A publisher that emits the result type
    • withConnectionFlux

      @NonNull default <T> @NonNull reactor.core.publisher.Flux<T> withConnectionFlux(@NonNull @NonNull Function<ConnectionStatus<C>,reactor.core.publisher.Flux<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
    • withConnectionMono

      @NonNull default <T> @NonNull reactor.core.publisher.Mono<T> withConnectionMono(@NonNull @NonNull ConnectionDefinition definition, @NonNull @NonNull Function<ConnectionStatus<C>,reactor.core.publisher.Mono<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
    • withConnectionMono

      default <T> reactor.core.publisher.Mono<T> withConnectionMono(@NonNull @NonNull Function<ConnectionStatus<C>,reactor.core.publisher.Mono<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
    • withConnection

      @NonNull default <T> @NonNull org.reactivestreams.Publisher<T> withConnection(@NonNull @NonNull ConnectionDefinition definition, @NonNull @NonNull Function<ConnectionStatus<C>,org.reactivestreams.Publisher<T>> handler)
      Description copied from interface: ReactiveStreamsConnectionOperations
      Execute the given handler with a new connection.
      Specified by:
      withConnection in interface ReactiveStreamsConnectionOperations<C>
      Type Parameters:
      T - The emitted type
      Parameters:
      definition - The definition
      handler - The handler
      Returns:
      A publisher that emits the result type