Uses of Class
io.ebean.datasource.DataSourceConfig
-
Uses of DataSourceConfig in io.ebean.datasource
Methods in io.ebean.datasource that return DataSourceConfigModifier and TypeMethodDescriptionDataSourceConfig.addProperty(String key, boolean value) Add a driver property.DataSourceConfig.addProperty(String key, int value) Add a driver property.DataSourceConfig.addProperty(String key, String value) Add a driver property.DataSourceConfig.copy()Return a copy of the DataSourceConfig.DataSourceConfig.loadSettings(Properties properties, String poolName) Load the settings from the properties supplied.DataSourceConfig.setAlert(DataSourceAlert alert) Set the alert implementation to use.DataSourceConfig.setApplicationName(String applicationName) Set the ClientInfo ApplicationName property.DataSourceConfig.setAutoCommit(boolean autoCommit) Set to true to turn on autoCommit.DataSourceConfig.setCaptureStackTrace(boolean captureStackTrace) Set to true if a stack trace should be captured when obtaining a connection from the pool.DataSourceConfig.setClientInfo(Properties clientInfo) Set the ClientInfo as properties.DataSourceConfig.setCstmtCacheSize(int cstmtCacheSize) Set the size of the CallableStatement cache (per connection).DataSourceConfig.setCustomProperties(Map<String, String> customProperties) Set custom properties for the jdbc driver connection.DataSourceConfig.setDefaults(DataSourceConfig other) Default the values for driver, url, username and password from another config if they have not been set.Set the database driver.DataSourceConfig.setFailOnStart(boolean failOnStart) Set to false, if DataSource should not fail on start.DataSourceConfig.setHeartbeatFreqSecs(int heartbeatFreqSecs) Set the expected heartbeat frequency in seconds.DataSourceConfig.setHeartbeatSql(String heartbeatSql) Set a SQL statement used to test the database is accessible.DataSourceConfig.setHeartbeatTimeoutSeconds(int heartbeatTimeoutSeconds) Set the heart beat timeout in seconds.DataSourceConfig.setInitDatabase(InitDatabase initDatabase) Set the InitDatabase to use with ownerUsername.DataSourceConfig.setInitDatabaseForPlatform(String platform) Set InitDatabase based on the database platform.DataSourceConfig.setInitSql(List<String> initSql) Set custom init queries for each query.DataSourceConfig.setIsolationLevel(int isolationLevel) Set the transaction isolation level.DataSourceConfig.setLeakTimeMinutes(int leakTimeMinutes) Set the time in minutes after which a connection could be considered to have leaked.DataSourceConfig.setListener(DataSourcePoolListener listener) Set the listener to use.DataSourceConfig.setMaxAgeMinutes(int maxAgeMinutes) Set the maximum age a connection can be in minutes.DataSourceConfig.setMaxConnections(int maxConnections) Set the maximum number of connections the pool can reach.DataSourceConfig.setMaxInactiveTimeSecs(int maxInactiveTimeSecs) Set the time in seconds a connection can be idle after which it can be trimmed from the pool.DataSourceConfig.setMaxStackTraceSize(int maxStackTraceSize) Set the max size for reporting stack traces on busy connections.DataSourceConfig.setMinConnections(int minConnections) Set the minimum number of connections the pool should maintain.DataSourceConfig.setOffline(boolean offline) Set to true if the DataSource should be started offline (without any connections).DataSourceConfig.setOwnerPassword(String ownerPassword) Set the database owner password (used to create connection for use with InitDatabase).DataSourceConfig.setOwnerUsername(String ownerUsername) Set the database owner username (used to create connection for use with InitDatabase).DataSourceConfig.setPassword(String password) Set the database password.DataSourceConfig.setPlatform(String platform) Set the database platform (for use with ownerUsername and InitDatabase.DataSourceConfig.setPoolListener(String poolListener) Set a pool listener.DataSourceConfig.setPstmtCacheSize(int pstmtCacheSize) Set the size of the PreparedStatement cache (per connection).DataSourceConfig.setReadOnly(boolean readOnly) Set to true to for read only.DataSourceConfig.setReadOnlyUrl(String readOnlyUrl) Set the connection URL to use for a matching read-only connection pool.Set the default database schema to use.DataSourceConfig.setTrimPoolFreqSecs(int trimPoolFreqSecs) Set the minimum trim gap between pool trim checks.Set the connection URL.DataSourceConfig.setUsername(String username) Set the database username.DataSourceConfig.setWaitTimeoutMillis(int waitTimeoutMillis) Set the time in millis to wait for a connection before timing out once the pool has reached its maximum size.Methods in io.ebean.datasource with parameters of type DataSourceConfigModifier and TypeMethodDescriptionstatic DataSourcePoolDataSourceFactory.create(String name, DataSourceConfig config) Create the DataSourcePool given the name and configuration.DataSourceFactory.createPool(String name, DataSourceConfig config) voidInitDatabase.run(Connection connection, DataSourceConfig config) Execute some database initialisation statements on a database where the user may not exist.voidPostgresInitDatabase.run(Connection connection, DataSourceConfig config) DataSourceConfig.setDefaults(DataSourceConfig other) Default the values for driver, url, username and password from another config if they have not been set.