Top Description Fields Constructors Methods
ch.qos.logback.core.sift

public Class AppenderTracker<E>

extends AbstractComponentTracker<Appender<E>>
Class Inheritance
Imports
ch.qos.logback.core.Appender, .Context, .CoreConstants, ch.qos.logback.core.helpers.NOPAppender, ch.qos.logback.core.joran.spi.JoranException, ch.qos.logback.core.spi.AbstractComponentTracker, .ContextAwareImpl

Track appenders by key. When an appender is not used for longer than DEFAULT_TIMEOUT it is stopped and removed.
Authors
Tommy Becker, Ceki Gulcu, David Roussel

Field Summary

Modifier and TypeField and Description
pack-priv final AppenderFactory<E>
pack-priv final Context
pack-priv final ContextAwareImpl
pack-priv int
Inherited from ch.qos.logback.core.spi.AbstractComponentTracker:
LINGERING_TIMEOUTmaxComponentstimeoutWAIT_BETWEEN_SUCCESSIVE_REMOVAL_ITERATIONS

Constructor Summary

AccessConstructor and Description
public
AppenderTracker(Context context, AppenderFactory<E> appenderFactory)

Method Summary

Modifier and TypeMethod and Description
protected Appender<E>
buildComponent(String key)

Implements abstract ch.qos.logback.core.spi.AbstractComponentTracker.buildComponent.

Build a component based on the key.
private NOPAppender<E>
protected boolean
isComponentStale(Appender<E> appender)

Implements abstract ch.qos.logback.core.spi.AbstractComponentTracker.isComponentStale.

Components can declare themselves stale.
protected void
processPriorToRemoval(Appender<E> component)

Implements abstract ch.qos.logback.core.spi.AbstractComponentTracker.processPriorToRemoval.

Stop or clean the component.
Inherited from ch.qos.logback.core.spi.AbstractComponentTracker:
allComponentsallKeysendOfLifefindgetComponentCountgetMaxComponentsgetOrCreategetTimeoutremoveStaleComponentssetMaxComponentssetTimeout

Field Detail

appenderFactoryback to summary
pack-priv final AppenderFactory<E> appenderFactory
contextback to summary
pack-priv final Context context
contextAwareback to summary
pack-priv final ContextAwareImpl contextAware
nopaWarningCountback to summary
pack-priv int nopaWarningCount

Constructor Detail

AppenderTrackerback to summary
public AppenderTracker(Context context, AppenderFactory<E> appenderFactory)

Method Detail

buildComponentback to summary
protected Appender<E> buildComponent(String key)

Implements abstract ch.qos.logback.core.spi.AbstractComponentTracker.buildComponent.

Doc from ch.qos.logback.core.spi.AbstractComponentTracker.buildComponent.

Build a component based on the key.

Annotations
@Override
buildNOPAppenderback to summary
private NOPAppender<E> buildNOPAppender(String key)
isComponentStaleback to summary
protected boolean isComponentStale(Appender<E> appender)

Implements abstract ch.qos.logback.core.spi.AbstractComponentTracker.isComponentStale.

Doc from ch.qos.logback.core.spi.AbstractComponentTracker.isComponentStale.

Components can declare themselves stale. Such components may be removed before they time out.

Annotations
@Override
processPriorToRemovalback to summary
protected void processPriorToRemoval(Appender<E> component)

Implements abstract ch.qos.logback.core.spi.AbstractComponentTracker.processPriorToRemoval.

Doc from ch.qos.logback.core.spi.AbstractComponentTracker.processPriorToRemoval.

Stop or clean the component.

Annotations
@Override