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, driverClassLoader, errorLogger, files, locale, logger, runnableFactory
Fields inherited from class com.djrapitops.plan.storage.database.AbstractDatabase
accessLock
-
Constructor Summary
ConstructorDescriptionMySQLDB
(Locale locale, PlanConfig config, PlanFiles files, 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
attemptToCloseTransactionExecutor, downloadDriver, executeTransaction, forceCloseTransactionExecutor, getLocale, getLogger, getRunnableFactory, getServerUUIDSupplier, getTransactionOrigin, getTransactionQueueSize, init, query, queryWithinTransaction, setDownloadDriver, setTransactionExecutorServiceProvider, shouldDropUnimportantTransactions, unloadDriverClassloader
Methods inherited from class com.djrapitops.plan.storage.database.AbstractDatabase
assumeNoMoreHeavyLoad, getHeavyLoadDelayMs, getState, increaseHeavyLoadDelay, isUnderHeavyLoad, setState
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods 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)
-
-
Method Details
-
getType
Description copied from interface:Database
Used to get theDBType
of the Database- Returns:
- the
DBType
- See Also:
-
getDependencyResource
- Specified by:
getDependencyResource
in classSQLDB
-
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()
-