Package org.apache.bookkeeper.bookie
Class UncleanShutdownDetectionImpl
java.lang.Object
org.apache.bookkeeper.bookie.UncleanShutdownDetectionImpl
- All Implemented Interfaces:
UncleanShutdownDetection
Used to determine if the prior shutdown was unclean or not. It does so
by adding a file to each ledger directory after successful start-up
and removing the file on graceful shutdown.
Any abrupt termination will cause one or more of these files to not be cleared
and so on the subsequent boot-up, the presence of any of these files will
indicate an unclean shutdown.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidvoid
-
Field Details
-
DIRTY_FILENAME
- See Also:
-
-
Constructor Details
-
UncleanShutdownDetectionImpl
-
-
Method Details
-
registerStartUp
- Specified by:
registerStartUpin interfaceUncleanShutdownDetection- Throws:
IOException
-
registerCleanShutdown
public void registerCleanShutdown()- Specified by:
registerCleanShutdownin interfaceUncleanShutdownDetection
-
lastShutdownWasUnclean
public boolean lastShutdownWasUnclean()- Specified by:
lastShutdownWasUncleanin interfaceUncleanShutdownDetection
-