Class AgroalDataSourceConfigurationSupplier
java.lang.Object
io.agroal.api.configuration.supplier.AgroalDataSourceConfigurationSupplier
- All Implemented Interfaces:
Supplier<AgroalDataSourceConfiguration>
public class AgroalDataSourceConfigurationSupplier
extends Object
implements Supplier<AgroalDataSourceConfiguration>
Builder of AgroalDataSourceConfiguration.
- Author:
- Luis Barreiro
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAllows access to the configuration builder for the connection pool.connectionPoolConfiguration(AgroalConnectionPoolConfiguration configuration) Sets the configuration of the connection pool.connectionPoolConfiguration(Function<? super AgroalConnectionPoolConfigurationSupplier, ? extends AgroalConnectionPoolConfigurationSupplier> function) Modifies the configuration of the connection pool.connectionPoolConfiguration(Supplier<? extends AgroalConnectionPoolConfiguration> supplier) Sets the configuration of the connection pool.Selects the AgroalDataSource implementation.get()Enables the collection of metrics.metricsEnabled(boolean metricsEnabled) Enables or disables the collection of metrics.
-
Constructor Details
-
AgroalDataSourceConfigurationSupplier
public AgroalDataSourceConfigurationSupplier()
-
-
Method Details
-
connectionPoolConfiguration
public AgroalDataSourceConfigurationSupplier connectionPoolConfiguration(AgroalConnectionPoolConfiguration configuration) Sets the configuration of the connection pool. -
connectionPoolConfiguration
public AgroalDataSourceConfigurationSupplier connectionPoolConfiguration(Supplier<? extends AgroalConnectionPoolConfiguration> supplier) Sets the configuration of the connection pool. -
connectionPoolConfiguration
public AgroalDataSourceConfigurationSupplier connectionPoolConfiguration(Function<? super AgroalConnectionPoolConfigurationSupplier, ? extends AgroalConnectionPoolConfigurationSupplier> function) Modifies the configuration of the connection pool. -
connectionPoolConfiguration
Allows access to the configuration builder for the connection pool. -
dataSourceImplementation
public AgroalDataSourceConfigurationSupplier dataSourceImplementation(AgroalDataSourceConfiguration.DataSourceImplementation implementation) Selects the AgroalDataSource implementation. The default is AGROAL. -
metricsEnabled
Enables the collection of metrics. -
metricsEnabled
Enables or disables the collection of metrics. The default is false. -
get
- Specified by:
getin interfaceSupplier<AgroalDataSourceConfiguration>
-