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
FieldsFields inherited from class com.djrapitops.plan.storage.database.SQLDB
applicationDependencyManager, config, driverClassLoader, errorLogger, files, locale, logger, runnableFactoryFields inherited from class com.djrapitops.plan.storage.database.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 com.djrapitops.plan.storage.database.SQLDB
attemptToCloseTransactionExecutor, downloadDriver, executeTransaction, forceCloseTransactionExecutor, getLocale, getLogger, getRunnableFactory, getServerUUIDSupplier, getTransactionOrigin, getTransactionQueueSize, init, query, queryWithinTransaction, setDownloadDriver, setTransactionExecutorServiceProvider, shouldDropUnimportantTransactions, unloadDriverClassloaderMethods inherited from class com.djrapitops.plan.storage.database.AbstractDatabase
assumeNoMoreHeavyLoad, getHeavyLoadDelayMs, getState, increaseHeavyLoadDelay, isUnderHeavyLoad, setStateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.djrapitops.plan.storage.database.Database
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
Description copied from interface:DatabaseUsed to get theDBTypeof the Database- Returns:
- the
DBType - See Also:
-
getDependencyResource
- Specified by:
getDependencyResourcein classSQLDB
-
setupDataSource
public void setupDataSource()Setups theHikariDataSource- Specified by:
setupDataSourcein classSQLDB
-
getConnection
- Specified by:
getConnectionin classSQLDB- Throws:
SQLException
-
close
public void close() -
returnToPool
- Specified by:
returnToPoolin classSQLDB
-
equals
-
hashCode
public int hashCode()
-