Package dev.array21.jdbd.drivers
Class MysqlDriverFactory
java.lang.Object
dev.array21.jdbd.drivers.MysqlDriverFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the MsqlDriver.setDatabase(String database) Set the MySQL databaseSet the MySQL hostsetPassword(String password) Set the MySQL passwordsetUsername(String username) Set the MySQL username
-
Constructor Details
-
MysqlDriverFactory
public MysqlDriverFactory()
-
-
Method Details
-
setHost
Set the MySQL host- Parameters:
host- The host to set- Returns:
- The current factory
-
setUsername
Set the MySQL username- Parameters:
username- The username to set- Returns:
- The current factory
-
setPassword
Set the MySQL password- Parameters:
password- The password to set- Returns:
- The current factory
-
setDatabase
Set the MySQL database- Parameters:
database- The database to set- Returns:
- The current factory
-
build
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 failedUnsatisfiedLinkError- When loading the native library failedUnsupportedOperatingSystemException- When the current operating system is unsupported
-