Class YAMLDispatcher
- java.lang.Object
-
- com.alessiodp.core.common.storage.dispatchers.YAMLDispatcher
-
- All Implemented Interfaces:
IDatabaseDispatcher
public abstract class YAMLDispatcher extends Object implements IDatabaseDispatcher
-
-
Field Summary
Fields Modifier and Type Field Description protected YAMLDaodatabaseprotected @NotNull ADPPluginpluginprotected YAMLUpgradeManagerupgradeManager
-
Constructor Summary
Constructors Constructor Description YAMLDispatcher()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidinit()Initialize the database dispatcherprotected abstract YAMLDaoinitDao()Initialize the file DAOprotected abstract YAMLUpgradeManagerinitUpgradeManager()Initialize the upgrade managerbooleanisFailed()Is failed to start the database?protected booleansave()Save the databasevoidstop()Stop the database dispatcher
-
-
-
Field Detail
-
plugin
@NotNull protected final @NotNull ADPPlugin plugin
-
database
protected YAMLDao database
-
upgradeManager
protected YAMLUpgradeManager upgradeManager
-
-
Method Detail
-
stop
public final void stop()
Description copied from interface:IDatabaseDispatcherStop the database dispatcher- Specified by:
stopin interfaceIDatabaseDispatcher
-
isFailed
public final boolean isFailed()
Description copied from interface:IDatabaseDispatcherIs failed to start the database?- Specified by:
isFailedin interfaceIDatabaseDispatcher- Returns:
- true if the initialization has failed
-
init
public void init()
Description copied from interface:IDatabaseDispatcherInitialize the database dispatcher- Specified by:
initin interfaceIDatabaseDispatcher
-
initDao
protected abstract YAMLDao initDao()
Initialize the file DAO- Returns:
- the initialized DAO
-
initUpgradeManager
protected abstract YAMLUpgradeManager initUpgradeManager()
Initialize the upgrade manager- Returns:
- the initialized upgrade manager
-
save
protected boolean save()
Save the database- Returns:
- true if successfully saved the database
-
-