Class MySQLDB
- java.lang.Object
-
- com.djrapitops.plan.storage.database.AbstractDatabase
-
- com.djrapitops.plan.storage.database.SQLDB
-
- com.djrapitops.plan.storage.database.MySQLDB
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.djrapitops.plan.storage.database.Database
Database.State
-
-
Field Summary
Fields Modifier and Type Field Description protected com.zaxxer.hikari.HikariDataSource
dataSource
-
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
Constructors Constructor Description MySQLDB(Locale locale, PlanConfig config, dagger.Lazy<ServerInfo> serverInfo, net.playeranalytics.plugin.scheduling.RunnableFactory runnableFactory, net.playeranalytics.plugin.server.PluginLogger pluginLogger, ErrorLogger errorLogger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
equals(java.lang.Object o)
java.sql.Connection
getConnection()
DBType
getType()
Used to get theDBType
of the Databaseint
hashCode()
void
returnToPool(java.sql.Connection connection)
void
setupDataSource()
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
-
-
-
-
Constructor Detail
-
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 Detail
-
getType
public DBType 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
public java.sql.Connection getConnection() throws java.sql.SQLException
- Specified by:
getConnection
in classSQLDB
- Throws:
java.sql.SQLException
-
returnToPool
public void returnToPool(java.sql.Connection connection)
- Specified by:
returnToPool
in classSQLDB
-
-