Class MysqlDriverFactory

java.lang.Object
dev.array21.jdbd.drivers.MysqlDriverFactory

public class MysqlDriverFactory extends Object
  • Constructor Details

    • MysqlDriverFactory

      public MysqlDriverFactory()
  • Method Details

    • setHost

      public MysqlDriverFactory setHost(String host)
      Set the MySQL host
      Parameters:
      host - The host to set
      Returns:
      The current factory
    • setUsername

      public MysqlDriverFactory setUsername(String username)
      Set the MySQL username
      Parameters:
      username - The username to set
      Returns:
      The current factory
    • setPassword

      public MysqlDriverFactory setPassword(String password)
      Set the MySQL password
      Parameters:
      password - The password to set
      Returns:
      The current factory
    • setDatabase

      public MysqlDriverFactory setDatabase(String database)
      Set the MySQL database
      Parameters:
      database - The database to set
      Returns:
      The current factory
    • build

      public MysqlDriver build() throws IOException
      Build the MsqlDriver. Throws an IllegalStateException when:
      • The host is unsert
      • The database is unset

      Thread Safety

      It is up to the implementer to guarantee that this method is NOT called from two threads simultaneously, this can result in Undefined Behaviour
      Returns:
      Return an instance of the MysqlDriver
      Throws:
      IOException - When saving the native library failed
      UnsatisfiedLinkError - When loading the native library failed
      UnsupportedOperatingSystemException - When the current operating system is unsupported