Package org.hibernate.reactive.pool
Interface ReactiveConnectionPool
-
- All Superinterfaces:
Serializable,Service
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 callingReactiveServiceRegistryBuilder.addService(java.lang.Class, org.hibernate.service.Service).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.ReactiveConnectiongetProxyConnection()Obtain a lazily-initializing reactive connection.ReactiveConnectiongetProxyConnection(String tenantId)Obtain a lazily-initializing reactive connection for the given tenant id.
-
-
-
Method Detail
-
getConnection
CompletionStage<ReactiveConnection> getConnection()
Obtain a reactive connection, returning the connection via aCompletionStage.
-
getConnection
CompletionStage<ReactiveConnection> getConnection(String tenantId)
Obtain a reactive connection for the given tenant id, returning the connection via aCompletionStage.
-
getProxyConnection
ReactiveConnection getProxyConnection()
Obtain a lazily-initializing reactive connection. The actual connection might be made when the returned instance ifReactiveConnectionis first used.
-
getProxyConnection
ReactiveConnection getProxyConnection(String tenantId)
Obtain a lazily-initializing reactive connection for the given tenant id. The actual connection might be made when the returned instance ifReactiveConnectionis first used.
-
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.
-
-