Class DataSourceManager
java.lang.Object
com.invirgance.convirgance.jdbc.datasource.DataSourceManager
Exposes data source properties at runtime, allowing for dynamic configuration
of
DataSource instances.- Author:
- jbanes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.invirgance.convirgance.json.JSONObjectCreates a clone of the data sources configuration.String[]Returns the properties available on the DataSource.getProperty(String name) Returns the value assigned to the data source's property.voidsetConfig(com.invirgance.convirgance.json.JSONObject config) Merges the provided configuration with the current one, overwriting existing values.voidsetProperty(String name, Object value) Sets a property value on the data source.voidsetProperty(String name, String value) Assign a value to one of the data source's properties.
-
Constructor Details
-
DataSourceManager
-
-
Method Details
-
getDataSource
-
getProperties
Returns the properties available on the DataSource. These can be used to configure how the Driver that uses this DataSource connects to the database.- Returns:
- Property names.
-
getProperty
Returns the value assigned to the data source's property.- Parameters:
name- Property name.- Returns:
- The value.
-
setProperty
Assign a value to one of the data source's properties. This will modify how drivers that utilize this data source create connections. Such as configuring SSL, setting cache properties etc...- Parameters:
name- Property name.value- Value to set.
-
setProperty
Sets a property value on the data source. A list of properties can be found withgetProperties()The values are set for the current run-time and do not persist.- Parameters:
name- Property name.value- Property value.
-
getConfig
public com.invirgance.convirgance.json.JSONObject getConfig()Creates a clone of the data sources configuration.- Returns:
- The configuration.
-
setConfig
public void setConfig(com.invirgance.convirgance.json.JSONObject config) Merges the provided configuration with the current one, overwriting existing values.- Parameters:
config- The configuration
-