public interface ReactiveConnectionPool
Service
that provides access to pooled reactive connections
. A custom implementation of ReactiveConnectionPool
may be selected by setting the configuration property Settings.SQL_CLIENT_POOL
.
Alternatively, a program may integrate a custom ReactiveConnectionPool
by contributing a new service using a org.hibernate.boot.registry.StandardServiceInitiator
or from code-based Hibernate configuration by calling ReactiveServiceRegistryBuilder.addService(java.lang.Class, Service)
.
new ReactiveServiceRegistryBuilder() .applySettings( properties ) .addService( ReactiveConnectionPool.class, new MyReactiveConnectionPool() ) .build();
Modifier and Type | Method and Description |
---|---|
CompletionStage<ReactiveConnection> | getConnection() Obtain a reactive connection, returning the connection via a CompletionStage . |
CompletionStage<ReactiveConnection> | getConnection(String tenantId) Obtain a reactive connection for the given tenant id, returning the connection via a CompletionStage . |
ReactiveConnection | getProxyConnection() Obtain a lazily-initializing reactive connection. |
ReactiveConnection | getProxyConnection(String tenantId) Obtain a lazily-initializing reactive connection for the given tenant id. |
CompletionStage<ReactiveConnection> getConnection()
CompletionStage
.CompletionStage<ReactiveConnection> getConnection(String tenantId)
CompletionStage
.ReactiveConnection getProxyConnection()
ReactiveConnection
is first used.ReactiveConnection getProxyConnection(String tenantId)
ReactiveConnection
is first used.