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.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intbufferSize(package private) static intDEFAULT_BUFFER_SIZE(package private) static intDEFAULT_NUMBER_OF_BUFFERS-
Fields inherited from class ch.qos.logback.core.spi.AbstractComponentTracker
lastCheck, lingerersMap, LINGERING_TIMEOUT, liveMap, 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.(package private) java.util.List<java.lang.String>lingererKeysAsOrderedList()(package private) java.util.List<java.lang.String>liveKeysAsOrderedList()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
-
-
-
-
Field Detail
-
DEFAULT_NUMBER_OF_BUFFERS
static final int DEFAULT_NUMBER_OF_BUFFERS
- See Also:
- Constant Field Values
-
DEFAULT_BUFFER_SIZE
static final int DEFAULT_BUFFER_SIZE
- See Also:
- Constant Field Values
-
bufferSize
int bufferSize
-
-
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:
-
liveKeysAsOrderedList
java.util.List<java.lang.String> liveKeysAsOrderedList()
-
lingererKeysAsOrderedList
java.util.List<java.lang.String> lingererKeysAsOrderedList()
-
-