Interface SynchronousConnectionManager<C>

Type Parameters:
C - The connection type
All Known Implementing Classes:
AbstractConnectionOperations, DefaultDataSourceConnectionOperations, HibernateConnectionOperations

public interface SynchronousConnectionManager<C>
The synchronous connection manager. The different from ConnectionOperations is that allows to open a connection and close it later. It's recommended to use ConnectionOperations is most of the cases.
Since:
4.0.0
Author:
Denis Stepanov
  • Method Details

    • getConnection

      @NonNull @NonNull ConnectionStatus<C> getConnection(@NonNull @NonNull ConnectionDefinition definition)
      Opens or reuses the existing connection based on the definition. It's required to call complete(ConnectionStatus) after the connection is not needed anymore.
      Parameters:
      definition - The connection definition.
      Returns:
      The connection status
    • complete

      void complete(@NonNull @NonNull ConnectionStatus<C> status)
      Completes the connection. Closes it if the connection was open before.
      Parameters:
      status - The connection status