Class Watchdog
java.lang.Object
ua.mcchickenstudio.opencreative.managers.stability.Watchdog
- All Implemented Interfaces:
Manager, ShutDownable, StabilityManager, Startable, Toggleable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong@NotNull StabilityStateReturns stability state of database connection.@NotNull StabilityStateReturns stability state of memory.@NotNull StringgetName()Returns name of manager, that will be displayed by request in the logs.@NotNull StabilityStategetState()Returns stability state of all systems.@NotNull StabilityStateReturns stability state of storage.@NotNull StabilityStateReturns stability state of ticks.longdoublegetTPS()longbooleanChecks whether manager was started successfully and it currently works.voidshutdown()Does tasks on shutdown.voidstart()Does tasks on start.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface StabilityManager
isFine, isVeryBad
-
Constructor Details
-
Watchdog
public Watchdog()
-
-
Method Details
-
start
-
isWorking
public boolean isWorking()Description copied from interface:ToggleableChecks whether manager was started successfully and it currently works.- Specified by:
isWorkingin interfaceToggleable- Returns:
- true - started up, false - shut downed.
-
shutdown
public void shutdown()Description copied from interface:ShutDownableDoes tasks on shutdown.- Specified by:
shutdownin interfaceShutDownable
-
getDatabaseState
Description copied from interface:StabilityManagerReturns stability state of database connection.- Specified by:
getDatabaseStatein interfaceStabilityManager- Returns:
- state of database.
-
getMemoryState
Description copied from interface:StabilityManagerReturns stability state of memory.- Specified by:
getMemoryStatein interfaceStabilityManager- Returns:
- state of RAM.
-
getStorageState
Description copied from interface:StabilityManagerReturns stability state of storage.- Specified by:
getStorageStatein interfaceStabilityManager- Returns:
- state of storage.
-
getTicksState
Description copied from interface:StabilityManagerReturns stability state of ticks.- Specified by:
getTicksStatein interfaceStabilityManager- Returns:
- state of TPS.
-
getName
-
getAvailableSpace
public long getAvailableSpace() -
getUsedSpace
public long getUsedSpace() -
getTPS
public double getTPS() -
getTotalSpace
public long getTotalSpace() -
getState
Description copied from interface:StabilityManagerReturns stability state of all systems.- Specified by:
getStatein interfaceStabilityManager- Returns:
- state of plugin
-