Class DBSystem
- java.lang.Object
-
- com.djrapitops.plan.storage.database.DBSystem
-
- All Implemented Interfaces:
SubSystem
- Direct Known Subclasses:
BukkitDBSystem
,NukkitDBSystem
,ProxyDBSystem
,SpongeDBSystem
@Singleton public class DBSystem extends java.lang.Object implements SubSystem
System that holds the active databases.
-
-
Constructor Summary
Constructors Constructor Description DBSystem(Locale locale, SQLiteDB.Factory sqLiteDB, H2DB.Factory h2Factory, net.playeranalytics.plugin.server.PluginLogger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disable()
Performs disable actions for the subsystemvoid
enable()
Performs enable actions for the subsystem.Database
getActiveDatabaseByName(java.lang.String dbName)
Database
getActiveDatabaseByType(DBType type)
Database
getDatabase()
java.util.Set<Database>
getDatabases()
H2DB.Factory
getH2Factory()
SQLiteDB.Factory
getSqLiteFactory()
void
setActiveDatabase(Database db)
-
-
-
Constructor Detail
-
DBSystem
public DBSystem(Locale locale, SQLiteDB.Factory sqLiteDB, H2DB.Factory h2Factory, net.playeranalytics.plugin.server.PluginLogger logger)
-
-
Method Detail
-
getActiveDatabaseByName
public Database getActiveDatabaseByName(java.lang.String dbName)
-
getDatabases
public java.util.Set<Database> getDatabases()
-
disable
public void disable()
Description copied from interface:SubSystem
Performs disable actions for the subsystem
-
getDatabase
public Database getDatabase()
-
enable
public void enable()
Description copied from interface:SubSystem
Performs enable actions for the subsystem.
-
setActiveDatabase
public void setActiveDatabase(Database db)
-
getSqLiteFactory
public SQLiteDB.Factory getSqLiteFactory()
-
getH2Factory
public H2DB.Factory getH2Factory()
-
-