java.lang.Object
io.github.tonywasher.joceanus.prometheus.database.PrometheusDBConfig

public class PrometheusDBConfig extends Object
Database config.
  • Constructor Details

    • PrometheusDBConfig

      public PrometheusDBConfig()
      Constructor.
  • Method Details

    • setDriver

      public void setDriver(PrometheusJDBCDriver pDriver)
      Set the driver.
      Parameters:
      pDriver - the driver
    • getDriver

      public PrometheusJDBCDriver getDriver()
      Get driver.
      Returns:
      the driver
    • setUser

      public void setUser(String pUser)
      Set the user.
      Parameters:
      pUser - the user
    • getUser

      public String 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

      public void setServer(String pServer)
      Set the server.
      Parameters:
      pServer - the server
    • getServer

      public String getServer()
      Get server.
      Returns:
      the server
    • setInstance

      public void setInstance(String pInstance)
      Set the instance.
      Parameters:
      pInstance - the instance
    • getInstance

      public String getInstance()
      Get instance.
      Returns:
      the instance
    • setPort

      public void setPort(Integer pPort)
      Set the port.
      Parameters:
      pPort - the port
    • getPort

      public Integer 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

      Construct config from prefs.
      Parameters:
      pPreferences - the preferences
      Returns:
      the config
    • postgres

      public static PrometheusDBConfig postgres()
      Construct a simple postgres config.
      Returns:
      the config
    • mysql

      public static PrometheusDBConfig mysql()
      Construct a simple mysql config.
      Returns:
      the config
    • mariaDB

      public static PrometheusDBConfig mariaDB()
      Construct a simple mariaDB config.
      Returns:
      the config
    • sqlserver

      public static PrometheusDBConfig sqlserver()
      Construct a simple selserver config.
      Returns:
      the config
    • h2

      public static PrometheusDBConfig h2()
      Construct a simple h2 config.
      Returns:
      the config