Database.State
Modifier and Type | Field and Description |
---|---|
protected javax.sql.DataSource |
dataSource |
config, errorHandler, locale, logger, networkContainerFactory, runnableFactory
accessLock
Constructor and Description |
---|
MySQLDB(Locale locale,
PlanConfig config,
dagger.Lazy<ServerInfo> serverInfo,
NetworkContainer.Factory networkContainerFactory,
com.djrapitops.plugin.task.RunnableFactory runnableFactory,
com.djrapitops.plugin.logging.console.PluginLogger pluginLogger,
com.djrapitops.plugin.benchmarking.Timings timings,
com.djrapitops.plugin.logging.error.ErrorHandler errorHandler) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
equals(java.lang.Object o) |
java.sql.Connection |
getConnection() |
DBType |
getType()
Used to get the
DBType of the Database |
int |
hashCode() |
void |
returnToPool(java.sql.Connection connection) |
void |
setupDataSource()
Setups the
HikariDataSource |
executeTransaction, getNetworkContainerFactory, getServerUUIDSupplier, init, query, setTransactionExecutorServiceProvider
getState, setState
@Inject public MySQLDB(Locale locale, PlanConfig config, dagger.Lazy<ServerInfo> serverInfo, NetworkContainer.Factory networkContainerFactory, com.djrapitops.plugin.task.RunnableFactory runnableFactory, com.djrapitops.plugin.logging.console.PluginLogger pluginLogger, com.djrapitops.plugin.benchmarking.Timings timings, com.djrapitops.plugin.logging.error.ErrorHandler errorHandler)
public DBType getType()
Database
DBType
of the DatabaseDBType
DBType
public void setupDataSource()
HikariDataSource
setupDataSource
in class SQLDB
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in class SQLDB
java.sql.SQLException
public void returnToPool(java.sql.Connection connection)
returnToPool
in class SQLDB