Class DriverBasedHikariConnectionFactory
java.lang.Object
me.lucko.luckperms.common.storage.implementation.sql.connection.hikari.HikariConnectionFactory
me.lucko.luckperms.common.storage.implementation.sql.connection.hikari.DriverBasedHikariConnectionFactory
- All Implemented Interfaces:
ConnectionFactory
- Direct Known Subclasses:
MariaDbConnectionFactory, MySqlConnectionFactory, PostgresConnectionFactory
Extension of
HikariConnectionFactory that uses the driver class name to configure Hikari.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDriverBasedHikariConnectionFactory(StorageCredentials configuration) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureDatabase(com.zaxxer.hikari.HikariConfig config, String address, String port, String databaseName, String username, String password) Configures theHikariConfigwith the relevant database properties.protected abstract Stringprotected abstract Stringprotected voidCalled after the Hikari pool has been initialisedMethods inherited from class HikariConnectionFactory
defaultPort, getConnection, getMeta, init, overrideProperties, setProperties, shutdownMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ConnectionFactory
getImplementationName, getStatementProcessor
-
Constructor Details
-
DriverBasedHikariConnectionFactory
-
-
Method Details
-
driverClassName
-
driverJdbcIdentifier
-
configureDatabase
protected void configureDatabase(com.zaxxer.hikari.HikariConfig config, String address, String port, String databaseName, String username, String password) Description copied from class:HikariConnectionFactoryConfigures theHikariConfigwith the relevant database properties.Each driver does this slightly differently...
- Specified by:
configureDatabasein classHikariConnectionFactory- Parameters:
config- the hikari configaddress- the database addressport- the database portdatabaseName- the database nameusername- the database usernamepassword- the database password
-
postInitialize
protected void postInitialize()Description copied from class:HikariConnectionFactoryCalled after the Hikari pool has been initialised- Overrides:
postInitializein classHikariConnectionFactory
-