Class MySQLDB
java.lang.Object
com.djrapitops.plan.storage.database.AbstractDatabase
com.djrapitops.plan.storage.database.SQLDB
com.djrapitops.plan.storage.database.MySQLDB
- All Implemented Interfaces:
Database
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.djrapitops.plan.storage.database.Database
Database.State
-
Field Summary
Fields inherited from class com.djrapitops.plan.storage.database.SQLDB
config, errorLogger, locale, logger, runnableFactory
Fields inherited from class com.djrapitops.plan.storage.database.AbstractDatabase
accessLock
-
Constructor Summary
ConstructorDescriptionMySQLDB(Locale locale, PlanConfig config, dagger.Lazy<ServerInfo> serverInfo, net.playeranalytics.plugin.scheduling.RunnableFactory runnableFactory, net.playeranalytics.plugin.server.PluginLogger pluginLogger, ErrorLogger errorLogger)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
getType()
Used to get theDBType
of the Databaseint
hashCode()
void
returnToPool(Connection connection)
void
Setups theHikariDataSource
Methods inherited from class com.djrapitops.plan.storage.database.SQLDB
executeTransaction, getLogger, getRunnableFactory, getServerUUIDSupplier, init, query, setTransactionExecutorServiceProvider
Methods inherited from class com.djrapitops.plan.storage.database.AbstractDatabase
assumeNoMoreHeavyLoad, getHeavyLoadDelayMs, getState, increaseHeavyLoadDelay, isUnderHeavyLoad, setState
-
Field Details
-
dataSource
protected com.zaxxer.hikari.HikariDataSource dataSource
-
-
Constructor Details
-
MySQLDB
@Inject public MySQLDB(Locale locale, PlanConfig config, dagger.Lazy<ServerInfo> serverInfo, net.playeranalytics.plugin.scheduling.RunnableFactory runnableFactory, net.playeranalytics.plugin.server.PluginLogger pluginLogger, ErrorLogger errorLogger)
-
-
Method Details
-
getType
Description copied from interface:Database
Used to get theDBType
of the Database- Returns:
- the
DBType
- See Also:
DBType
-
setupDataSource
public void setupDataSource()Setups theHikariDataSource
- Specified by:
setupDataSource
in classSQLDB
-
getConnection
- Specified by:
getConnection
in classSQLDB
- Throws:
SQLException
-
close
public void close() -
returnToPool
- Specified by:
returnToPool
in classSQLDB
-
equals
-
hashCode
public int hashCode()
-