public abstract class SqlClientPool extends Object implements ReactiveConnectionPool
Pool
.Constructor and Description |
---|
SqlClientPool() |
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 . |
protected abstract Pool | getPool() |
ReactiveConnection | getProxyConnection() Obtain a lazily-initializing reactive connection. |
ReactiveConnection | getProxyConnection(String tenantId) Obtain a lazily-initializing reactive connection for the given tenant id. |
protected abstract SqlStatementLogger | getSqlStatementLogger() |
protected Pool | getTenantPool(String tenantId) Get a Pool for the specified tenant. |
protected abstract boolean | usePostgresStyleParameters() |
protected abstract Pool getPool()
Pool
protected abstract SqlStatementLogger getSqlStatementLogger()
SqlStatementLogger
for logging SQL statements as they are executedprotected abstract boolean usePostgresStyleParameters()
protected Pool getTenantPool(String tenantId)
Pool
for the specified tenant. This is an unimplemented operation which must be overridden by subclasses which support multitenancy.
tenantId
- the id of the tenantUnsupportedOperationException
- if multitenancy is not supportedgetConnection(String)
public CompletionStage<ReactiveConnection> getConnection()
ReactiveConnectionPool
CompletionStage
.getConnection
in interface ReactiveConnectionPool
public CompletionStage<ReactiveConnection> getConnection(String tenantId)
ReactiveConnectionPool
CompletionStage
.getConnection
in interface ReactiveConnectionPool
public ReactiveConnection getProxyConnection()
ReactiveConnectionPool
ReactiveConnection
is first used.getProxyConnection
in interface ReactiveConnectionPool
public ReactiveConnection getProxyConnection(String tenantId)
ReactiveConnectionPool
ReactiveConnection
is first used.getProxyConnection
in interface ReactiveConnectionPool