Package io.quarkus.agroal.runtime
Class DataSourceJdbcRuntimeConfig
- java.lang.Object
-
- io.quarkus.agroal.runtime.DataSourceJdbcRuntimeConfig
-
public class DataSourceJdbcRuntimeConfig extends Object
-
-
Field Summary
Fields Modifier and Type Field Description Optional<Duration>acquisitionTimeoutThe timeout before cancelling the acquisition of a new connectionMap<String,String>additionalJdbcPropertiesOther unspecified properties to be passed to the JDBC driver when creating new connections.Optional<Duration>backgroundValidationIntervalThe interval at which we validate idle connections in the background.booleandetectStatementLeaksWhen enabled Agroal will be able to produce a warning when a connection is returned to the pool without the application having closed all open statements.Optional<Duration>idleRemovalIntervalThe interval at which we try to remove idle connections.OptionalIntinitialSizeThe initial size of the pool.Optional<Duration>leakDetectionIntervalThe interval at which we check for connection leaks.Optional<Duration>maxLifetimeThe max lifetime of a connection.intmaxSizeThe datasource pool maximum sizeintminSizeThe datasource pool minimum sizeOptional<String>newConnectionSqlQuery executed when first using a connection.booleanpoolingEnabledDisable pooling to prevent reuse of Connections.Optional<io.agroal.api.configuration.AgroalConnectionFactoryConfiguration.TransactionIsolation>transactionIsolationLevelThe transaction isolation level.Optional<String>urlThe datasource URLOptional<String>validationQuerySqlQuery executed to validate a connection.
-
Constructor Summary
Constructors Constructor Description DataSourceJdbcRuntimeConfig()
-
-
-
Field Detail
-
url
@ConfigItem public Optional<String> url
The datasource URL
-
initialSize
@ConfigItem public OptionalInt initialSize
The initial size of the pool. Usually you will want to set the initial size to match at least the minimal size, but this is not enforced so to allow for architectures which prefer a lazy initialization of the connections on boot, while being able to sustain a minimal pool size after boot.
-
minSize
@ConfigItem public int minSize
The datasource pool minimum size
-
maxSize
@ConfigItem(defaultValue="20") public int maxSize
The datasource pool maximum size
-
backgroundValidationInterval
@ConfigItem(defaultValue="2M") public Optional<Duration> backgroundValidationInterval
The interval at which we validate idle connections in the background.Set to
0to disable background validation.
-
acquisitionTimeout
@ConfigItem(defaultValue="5") public Optional<Duration> acquisitionTimeout
The timeout before cancelling the acquisition of a new connection
-
leakDetectionInterval
@ConfigItem public Optional<Duration> leakDetectionInterval
The interval at which we check for connection leaks.
-
idleRemovalInterval
@ConfigItem(defaultValue="5M") public Optional<Duration> idleRemovalInterval
The interval at which we try to remove idle connections.
-
maxLifetime
@ConfigItem public Optional<Duration> maxLifetime
The max lifetime of a connection.
-
transactionIsolationLevel
@ConfigItem public Optional<io.agroal.api.configuration.AgroalConnectionFactoryConfiguration.TransactionIsolation> transactionIsolationLevel
The transaction isolation level.
-
detectStatementLeaks
@ConfigItem(defaultValue="true") public boolean detectStatementLeaks
When enabled Agroal will be able to produce a warning when a connection is returned to the pool without the application having closed all open statements. This is unrelated with tracking of open connections. Disable for peak performance, but only when there's high confidence that no leaks are happening.
-
newConnectionSql
@ConfigItem public Optional<String> newConnectionSql
Query executed when first using a connection.
-
validationQuerySql
@ConfigItem public Optional<String> validationQuerySql
Query executed to validate a connection.
-
poolingEnabled
@ConfigItem(defaultValue="true") public boolean poolingEnabled
Disable pooling to prevent reuse of Connections. Use this with when an external pool manages the life-cycle of Connections.
-
additionalJdbcProperties
@ConfigItem public Map<String,String> additionalJdbcProperties
Other unspecified properties to be passed to the JDBC driver when creating new connections.
-
-