Package io.agroal.api.configuration
Interface AgroalConnectionFactoryConfiguration
public interface AgroalConnectionFactoryConfiguration
The configuration of the connection factory.
- Author:
- Luis Barreiro
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInterface to define the transaction isolation level.static enumThe default transaction isolation levels, defined inConnection. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf connections should have the auto-commit mode on by default.Class<?> JDBC driver class to use as a supplier of connections.Collection of evidence used for authentication.A SQL command to be executed when a connection is created.Other unspecified properties to be passed into the JDBC driver when creating new connections.The isolation level between database transactions.jdbcUrl()The database URL to connect to.Maximum time to wait while attempting to connect to a database.booleanRetrieve recovery connections from the pool.Entity to be authenticated in the database.booleanreadOnly()If pooled connections are kept in read-only state, according toConnection.setReadOnly(boolean)}.Collection of evidence used for authentication for recovery connections.Entity to be authenticated in the database for recovery connections.A collection of providers that are capable of handling principal / credential objectsbooleanOverride of JDBC properties used for XA drivers.
-
Method Details
-
autoCommit
boolean autoCommit()If connections should have the auto-commit mode on by default. The transaction integration may disable auto-commit when a connection in enrolled in a transaction. -
readOnly
boolean readOnly()If pooled connections are kept in read-only state, according toConnection.setReadOnly(boolean)}. The JDBC driver is responsible for enforcing. -
trackJdbcResources
boolean trackJdbcResources() -
loginTimeout
Duration loginTimeout()Maximum time to wait while attempting to connect to a database. Resolution in seconds. -
jdbcUrl
String jdbcUrl()The database URL to connect to. -
initialSql
String initialSql()A SQL command to be executed when a connection is created. -
connectionProviderClass
Class<?> connectionProviderClass()JDBC driver class to use as a supplier of connections. Must be an implementation ofDriver,DataSourceorXADataSource. Can be null, in which case the driver will be obtained from the URL (using theDriverManager.getDriver(String)mechanism). -
jdbcTransactionIsolation
AgroalConnectionFactoryConfiguration.IsolationLevel jdbcTransactionIsolation()The isolation level between database transactions. -
securityProviders
Collection<AgroalSecurityProvider> securityProviders()A collection of providers that are capable of handling principal / credential objects -
principal
Principal principal()Entity to be authenticated in the database. -
credentials
Collection<Object> credentials()Collection of evidence used for authentication. -
poolRecovery
boolean poolRecovery()Retrieve recovery connections from the pool. -
recoveryPrincipal
Principal recoveryPrincipal()Entity to be authenticated in the database for recovery connections. If not set, the principal will be used. -
recoveryCredentials
Collection<Object> recoveryCredentials()Collection of evidence used for authentication for recovery connections. If not set, the credentials will be used. -
jdbcProperties
Properties jdbcProperties()Other unspecified properties to be passed into the JDBC driver when creating new connections. NOTE: username and password properties are not allowed, these have to be set using the principal / credentials mechanism. -
xaProperties
Properties xaProperties()Override of JDBC properties used for XA drivers. If left empty, the regular JDBC properties are used for both XA and non-XA.
-