public abstract class SafeLifecycle extends Object implements Lifecycle
Guide
*: No-op (will not invoke operation)
-: Error (will throw IllegalStateException)
P: PRE ("pre init")
I: IDLE ("initialized" or "stopped")
R: RUN ("started")
H: HALT ("shutdown")
A successful operation is an operation not throwing an exception.
End states on a successful operation.
--------------------------------------------------- | FROM \ op | init() start() stop() shutdown() | --------------------------------------------------- | PRE | IDLE - - HALT(*) | | IDLE | - RUN IDLE(*) HALT | | RUN | - - IDLE - | | HALT | - - - - | ---------------------------------------------------End states on a failed operation.
--------------------------------------------------- | FROM \ op | init() start() stop() shutdown() | --------------------------------------------------- | PRE | PRE - - HALT(*) | | IDLE | - IDLE IDLE(*) HALT | | RUN | - - IDLE - | | HALT | - - - - | ---------------------------------------------------A few notes:
Because of the way that LifeSupport operates today, this
class will ignore stop() calls made while in IDLE. Similarly, calls
to shutdown() will be ignored while in PRE. This allows this class
to be managed by a LifeSupport without throwing
IllegalStateException on those state transitions, which
otherwise would have been disallowed and handled in the same way
as other illegal state transitions.
This adapter will not allow a shutdown lifecycle to be reinitialized and started again.
Lifecycle.DelegateCopyright © 2002–2018 The Neo4j Graph Database Project. All rights reserved.