Merge branch '1777-lifecycle-manager' into 'master'

Allow process to exit if an exception is thrown during shutdown

Closes #1777

See merge request briar/briar!1668
This commit is contained in:
akwizgran
2022-06-29 14:23:16 +00:00
4 changed files with 112 additions and 51 deletions

View File

@@ -37,8 +37,14 @@ public interface LifecycleManager {
*/
enum LifecycleState {
STARTING, MIGRATING_DATABASE, COMPACTING_DATABASE, STARTING_SERVICES,
RUNNING, STOPPING;
CREATED,
STARTING,
MIGRATING_DATABASE,
COMPACTING_DATABASE,
STARTING_SERVICES,
RUNNING,
STOPPING,
STOPPED;
public boolean isAfter(LifecycleState state) {
return ordinal() > state.ordinal();