LifeCycle
, LifeCycle2
AbstractFilter
, AbstractFilterable
, AbstractTriggeringPolicy
, AsyncLoggerConfigDisruptor
, CompositeFilter
, ConfigurationScheduler
, IdlePurgePolicy
, LoggerContext
, WatchManager
public class AbstractLifeCycle extends Object implements LifeCycle2
Wraps a LifeCycle.State
.
LifeCycle.State
Modifier and Type | Field | Description |
---|---|---|
static int |
DEFAULT_STOP_TIMEOUT |
|
static TimeUnit |
DEFAULT_STOP_TIMEUNIT |
|
protected static Logger |
LOGGER |
Allow subclasses access to the status logger without creating another instance.
|
Constructor | Description |
---|---|
AbstractLifeCycle() |
Modifier and Type | Method | Description |
---|---|---|
protected boolean |
equalsImpl(Object obj) |
|
LifeCycle.State |
getState() |
Gets the life-cycle state.
|
protected static Logger |
getStatusLogger() |
Gets the status logger.
|
protected int |
hashCodeImpl() |
|
void |
initialize() |
|
boolean |
isInitialized() |
|
boolean |
isStarted() |
|
boolean |
isStarting() |
|
boolean |
isStopped() |
|
boolean |
isStopping() |
|
protected void |
setStarted() |
|
protected void |
setStarting() |
|
protected void |
setState(LifeCycle.State newState) |
|
protected void |
setStopped() |
|
protected void |
setStopping() |
|
void |
start() |
|
void |
stop() |
|
boolean |
stop(long timeout,
TimeUnit timeUnit) |
Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current
thread is interrupted, whichever happens first.
|
protected boolean |
stop(Future<?> future) |
public static final int DEFAULT_STOP_TIMEOUT
public static final TimeUnit DEFAULT_STOP_TIMEUNIT
protected static final Logger LOGGER
protected static Logger getStatusLogger()
protected boolean equalsImpl(Object obj)
public LifeCycle.State getState()
LifeCycle
protected int hashCodeImpl()
public boolean isInitialized()
public boolean isStarting()
public boolean isStopping()
protected void setStarted()
protected void setStarting()
protected void setState(LifeCycle.State newState)
protected void setStopped()
protected void setStopping()
public void initialize()
initialize
in interface LifeCycle
protected boolean stop(Future<?> future)
public boolean stop(long timeout, TimeUnit timeUnit)
LifeCycle2
stop
in interface LifeCycle2
timeout
- the maximum time to waittimeUnit
- the time unit of the timeout argumentCopyright © 1999-2018. 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.