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 Database
Database.State -
Field Summary
FieldsFields inherited from class SQLDB
applicationDependencyManager, config, driverClassLoader, errorLogger, files, locale, logger, runnableFactoryFields inherited from class AbstractDatabase
accessLock -
Constructor Summary
ConstructorsConstructorDescriptionMySQLDB(Locale locale, PlanConfig config, PlanFiles files, dagger.Lazy<ServerInfo> serverInfo, net.playeranalytics.plugin.scheduling.RunnableFactory runnableFactory, net.playeranalytics.plugin.server.PluginLogger pluginLogger, ErrorLogger errorLogger, dev.vankka.dependencydownload.ApplicationDependencyManager applicationDependencyManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleangetType()Used to get theDBTypeof the DatabaseinthashCode()voidreturnToPool(Connection connection) voidSetups theHikariDataSourceMethods inherited from class SQLDB
attemptToCloseTransactionExecutor, downloadDriver, executeTransaction, forceCloseTransactionExecutor, getLocale, getLogger, getRunnableFactory, getServerUUIDSupplier, getTransactionOrigin, getTransactionQueueSize, init, query, queryWithinTransaction, setDownloadDriver, setTransactionExecutorServiceProvider, shouldDropUnimportantTransactions, unloadDriverClassloaderMethods inherited from class AbstractDatabase
assumeNoMoreHeavyLoad, getHeavyLoadDelayMs, getState, increaseHeavyLoadDelay, isUnderHeavyLoad, setStateMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Database
executeInTransaction, executeInTransaction, getSql, queryCollection, queryList, queryMap, queryMap, queryOptional, querySet
-
Field Details
-
dataSource
protected com.zaxxer.hikari.HikariDataSource dataSource
-
-
Constructor Details
-
MySQLDB
@Inject public MySQLDB(Locale locale, PlanConfig config, PlanFiles files, dagger.Lazy<ServerInfo> serverInfo, net.playeranalytics.plugin.scheduling.RunnableFactory runnableFactory, net.playeranalytics.plugin.server.PluginLogger pluginLogger, ErrorLogger errorLogger, dev.vankka.dependencydownload.ApplicationDependencyManager applicationDependencyManager)
-
-
Method Details
-
getType
-
getDependencyResource
- Specified by:
getDependencyResourcein classSQLDB
-
setupDataSource
public void setupDataSource()Setups theHikariDataSource- Specified by:
setupDataSourcein classSQLDB
-
getConnection
- Specified by:
getConnectionin classSQLDB- Throws:
SQLException
-
close
-
returnToPool
- Specified by:
returnToPoolin classSQLDB
-
equals
-
hashCode
-