Package ch.qos.logback.core.sift

# Class AppenderTracker<E>

java.lang.Object
ch.qos.logback.core.spi.AbstractComponentTracker<Appender<E>>
ch.qos.logback.core.sift.AppenderTracker<E>

All Implemented Interfaces:
  `ComponentTracker<Appender<E>>`

public class AppenderTracker<E> extends AbstractComponentTracker<Appender<E>>
Track appenders by key. When an appender is not used for longer than `ComponentTracker.DEFAULT_TIMEOUT` it is stopped and removed.

Author:
  Tommy Becker, Ceki Gulcu, David Roussel

## Field Summary

### Fields inherited from class ch.qos.logback.core.spi.AbstractComponentTracker

`LINGERING_TIMEOUT, maxComponents, timeout, WAIT_BETWEEN_SUCCESSIVE_REMOVAL_ITERATIONS`

### Fields inherited from interface ch.qos.logback.core.spi.ComponentTracker

`DEFAULT_MAX_COMPONENTS, DEFAULT_TIMEOUT`

## Constructor Summary

Constructors
Constructor
Description
`AppenderTracker(Context context, AppenderFactory<E> appenderFactory)`

## Method Summary

Modifier and Type
Method
Description
`protected Appender<E>`
`buildComponent(String key)`
Build a component based on the key.
`protected boolean`
`isComponentStale(Appender<E> appender)`
Components can declare themselves stale.
`protected void`
`processPriorToRemoval(Appender<E> component)`
Stop or clean the component.

### Methods inherited from class ch.qos.logback.core.spi.AbstractComponentTracker

`allComponents, allKeys, endOfLife, find, getComponentCount, getMaxComponents, getOrCreate, getTimeout, removeStaleComponents, setMaxComponents, setTimeout`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### AppenderTracker

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

## Method Details

### processPriorToRemoval

protected void processPriorToRemoval(Appender<E> component)
Description copied from class: `AbstractComponentTracker`
Stop or clean the component.

Specified by:
  `processPriorToRemoval` in class `AbstractComponentTracker<Appender<E>>`

### buildComponent

protected Appender<E> buildComponent(String key)
Description copied from class: `AbstractComponentTracker`
Build a component based on the key.

Specified by:
  `buildComponent` in class `AbstractComponentTracker<Appender<E>>`
Returns:

### isComponentStale

protected boolean isComponentStale(Appender<E> appender)
Description copied from class: `AbstractComponentTracker`
Components can declare themselves stale. Such components may be removed before they time out.

Specified by:
  `isComponentStale` in class `AbstractComponentTracker<Appender<E>>`
Returns: