public interface LifeCycle
LifeCycle.State.INITIALIZED
state
by default to indicate the class has been loaded. From here, calling the start()
method will change this
state to LifeCycle.State.STARTING
. After successfully being started, this state is changed to LifeCycle.State.STARTED
.
When the stop()
is called, this goes into the LifeCycle.State.STOPPING
state. After successfully being
stopped, this goes into the LifeCycle.State.STOPPED
state. In most circumstances, implementation classes should
store their LifeCycle.State
in a volatile
field or inside an
AtomicReference
dependent on synchronization and concurrency requirements.AbstractLifeCycle
Modifier and Type | Interface and Description |
---|---|
static class |
LifeCycle.State
Status of a life cycle like a
LoggerContext . |
Modifier and Type | Method and Description |
---|---|
LifeCycle.State |
getState()
Gets the life-cycle state.
|
void |
initialize() |
boolean |
isStarted() |
boolean |
isStopped() |
void |
start() |
void |
stop() |
LifeCycle.State getState()
void initialize()
void start()
void stop()
boolean isStarted()
boolean isStopped()
Copyright © 1999-2020 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.