Package org.hibernate.reactive.pool
Interface ReactiveConnectionPool
-
- All Superinterfaces:
Serializable,Service
@Incubating public interface ReactiveConnectionPool extends Service
A HibernateServicethat provides access to pooledreactive connections.A custom implementation of
ReactiveConnectionPoolmay be selected by setting the configuration propertySettings.SQL_CLIENT_POOL.Alternatively, a program may integrate a custom
ReactiveConnectionPoolby contributing a new service using aStandardServiceInitiatoror from code-based Hibernate configuration by callingStandardServiceRegistryBuilder.addService(java.lang.Class<T>, T).new ReactiveServiceRegistryBuilder() .applySettings( properties ) .addService( ReactiveConnectionPool.class, new MyReactiveConnectionPool() ) .build();
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletionStage<Void>getCloseFuture()The shutdown of the pool is actually asynchronous but the core service registry won't return theCompletionStage.CompletionStage<ReactiveConnection>getConnection()Obtain a reactive connection, returning the connection via aCompletionStage.CompletionStage<ReactiveConnection>getConnection(String tenantId)Obtain a reactive connection for the given tenant id, returning the connection via aCompletionStage.CompletionStage<ReactiveConnection>getConnection(String tenantId, SqlExceptionHelper sqlExceptionHelper)Obtain a reactive connection for the given tenant id, returning the connection via aCompletionStageand overriding the defaultSqlExceptionHelperfor the pool.CompletionStage<ReactiveConnection>getConnection(SqlExceptionHelper sqlExceptionHelper)Obtain a reactive connection, returning the connection via aCompletionStageand overriding the defaultSqlExceptionHelperfor the pool.CompletionStage<ResultSet>selectJdbcOutsideTransaction(String sql, Object[] paramValues)
-
-
-
Method Detail
-
getConnection
CompletionStage<ReactiveConnection> getConnection()
Obtain a reactive connection, returning the connection via aCompletionStage.
-
getConnection
CompletionStage<ReactiveConnection> getConnection(SqlExceptionHelper sqlExceptionHelper)
Obtain a reactive connection, returning the connection via aCompletionStageand overriding the defaultSqlExceptionHelperfor the pool.
-
getConnection
CompletionStage<ReactiveConnection> getConnection(String tenantId)
Obtain a reactive connection for the given tenant id, returning the connection via aCompletionStage.
-
getConnection
CompletionStage<ReactiveConnection> getConnection(String tenantId, SqlExceptionHelper sqlExceptionHelper)
Obtain a reactive connection for the given tenant id, returning the connection via aCompletionStageand overriding the defaultSqlExceptionHelperfor the pool.
-
selectJdbcOutsideTransaction
CompletionStage<ResultSet> selectJdbcOutsideTransaction(String sql, Object[] paramValues)
-
getCloseFuture
CompletionStage<Void> getCloseFuture()
The shutdown of the pool is actually asynchronous but the core service registry won't return theCompletionStage. If you need to wait for the underlying pool to be closed, after closing the SessionFactory you can get the CompletionStage instance from this getter.
-
-