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 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
    • managesConnection

      boolean managesConnection(@NonNull @NonNull ConnectionStatus<C> connectionStatus)
      Determine whether the given connection status refers to a connection managed by this ReactiveStreamsConnectionOperations instance.
      Parameters:
      connectionStatus - The connection status to verify
      Returns:
      true if the connection is managed (i.e. created/supplied) by this operations instance
      Since:
      5.0