- All Known Implementing Classes:
DatabaseManager
public interface IDatabaseManager
-
Method Summary
Modifier and TypeMethodDescription@NotNull StringgetName()Get the name of this instance.booleanisDatabaseRegistered(@NotNull AbstractDatabase database) Check if anAbstractDatabaseis registered in this manager.booleanisReady()Check if all guild data has been processed and is ready for use.booleanregister(@NotNull Plugin owningPlugin, @NotNull AbstractDatabase database) Register anAbstractDatabasethat aPluginrequires.
-
Method Details
-
isReady
boolean isReady()Check if all guild data has been processed and is ready for use.- Returns:
- Returns
truewhen all data has been loaded from the database
-
register
boolean register(@NotNull @NotNull Plugin owningPlugin, @NotNull @NotNull AbstractDatabase database) throws IOException Register anAbstractDatabasethat aPluginrequires.- Parameters:
owningPlugin- - owner of the instancedatabase- - database to register- Returns:
- Returns
trueif the database was registered.falseotherwise. - Throws:
IOException- Thrown if there was an error while reading database setup files
-
isDatabaseRegistered
Check if anAbstractDatabaseis registered in this manager.- Parameters:
database- - the database to check if it exists- Returns:
- Returns
trueif the database is registered,falseotherwise.
-
getName
Get the name of this instance.- Returns:
- Returns the name of this instance.
-