Class PrometheusDBConfig
java.lang.Object
io.github.tonywasher.joceanus.prometheus.database.PrometheusDBConfig
Database config.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PrometheusDBConfigfromPrefs(PrometheusDatabase.PrometheusDatabasePreferences pPreferences) Construct config from prefs.intGet batchSize.Get driver.Get instance.char[]Get password.getPort()Get port.Get server.getUser()Get user.static PrometheusDBConfigh2()Construct a simple h2 config.static PrometheusDBConfigmariaDB()Construct a simple mariaDB config.static PrometheusDBConfigmysql()Construct a simple mysql config.static PrometheusDBConfigpostgres()Construct a simple postgres config.voidsetBatchSize(int pSize) Set the batchSize.voidsetDriver(PrometheusJDBCDriver pDriver) Set the driver.voidsetInstance(String pInstance) Set the instance.voidsetPassword(char[] pPassword) Set the password.voidSet the port.voidSet the server.voidSet the user.static PrometheusDBConfigConstruct a simple selserver config.
-
Constructor Details
-
PrometheusDBConfig
public PrometheusDBConfig()Constructor.
-
-
Method Details
-
setDriver
Set the driver.- Parameters:
pDriver- the driver
-
getDriver
Get driver.- Returns:
- the driver
-
setUser
Set the user.- Parameters:
pUser- the user
-
getUser
Get user.- Returns:
- the user
-
setPassword
public void setPassword(char[] pPassword) Set the password.- Parameters:
pPassword- the password
-
getPassword
public char[] getPassword()Get password.- Returns:
- the password
-
setServer
Set the server.- Parameters:
pServer- the server
-
getServer
Get server.- Returns:
- the server
-
setInstance
Set the instance.- Parameters:
pInstance- the instance
-
getInstance
Get instance.- Returns:
- the instance
-
setPort
Set the port.- Parameters:
pPort- the port
-
getPort
Get port.- Returns:
- the port
-
setBatchSize
public void setBatchSize(int pSize) Set the batchSize.- Parameters:
pSize- the batchSize
-
getBatchSize
public int getBatchSize()Get batchSize.- Returns:
- the batchSize
-
fromPrefs
public static PrometheusDBConfig fromPrefs(PrometheusDatabase.PrometheusDatabasePreferences pPreferences) Construct config from prefs.- Parameters:
pPreferences- the preferences- Returns:
- the config
-
postgres
Construct a simple postgres config.- Returns:
- the config
-
mysql
Construct a simple mysql config.- Returns:
- the config
-
mariaDB
Construct a simple mariaDB config.- Returns:
- the config
-
sqlserver
Construct a simple selserver config.- Returns:
- the config
-
h2
Construct a simple h2 config.- Returns:
- the config
-