Package ch.qos.logback.core.spi
Class CyclicBufferTracker<E>
- java.lang.Object
-
- ch.qos.logback.core.spi.AbstractComponentTracker<CyclicBuffer<E>>
-
- ch.qos.logback.core.spi.CyclicBufferTracker<E>
-
- All Implemented Interfaces:
ComponentTracker<CyclicBuffer<E>>
public class CyclicBufferTracker<E> extends AbstractComponentTracker<CyclicBuffer<E>>
CyclicBufferTracker tracksCyclicBufferinstances.- Author:
- Ceki Gülcü
-
-
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 CyclicBufferTracker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CyclicBuffer<E>buildComponent(java.lang.String key)Build a component based on the key.intgetBufferSize()protected booleanisComponentStale(CyclicBuffer<E> eCyclicBuffer)Components can declare themselves stale.protected voidprocessPriorToRemoval(CyclicBuffer<E> component)Stop or clean the component.voidsetBufferSize(int bufferSize)-
Methods inherited from class ch.qos.logback.core.spi.AbstractComponentTracker
allComponents, allKeys, endOfLife, find, getComponentCount, getMaxComponents, getOrCreate, getTimeout, removeStaleComponents, setMaxComponents, setTimeout
-
-
-
-
Method Detail
-
getBufferSize
public int getBufferSize()
-
setBufferSize
public void setBufferSize(int bufferSize)
-
processPriorToRemoval
protected void processPriorToRemoval(CyclicBuffer<E> component)
Description copied from class:AbstractComponentTrackerStop or clean the component.- Specified by:
processPriorToRemovalin classAbstractComponentTracker<CyclicBuffer<E>>
-
buildComponent
protected CyclicBuffer<E> buildComponent(java.lang.String key)
Description copied from class:AbstractComponentTrackerBuild a component based on the key.- Specified by:
buildComponentin classAbstractComponentTracker<CyclicBuffer<E>>- Returns:
-
isComponentStale
protected boolean isComponentStale(CyclicBuffer<E> eCyclicBuffer)
Description copied from class:AbstractComponentTrackerComponents can declare themselves stale. Such components may be removed before they time out.- Specified by:
isComponentStalein classAbstractComponentTracker<CyclicBuffer<E>>- Returns:
-
-