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 tracksCyclicBuffer
instances.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
bufferSize
(package private) static int
DEFAULT_BUFFER_SIZE
(package private) static int
DEFAULT_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.int
getBufferSize()
protected boolean
isComponentStale(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 void
processPriorToRemoval(CyclicBuffer<E> component)
Stop or clean the component.void
setBufferSize(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:AbstractComponentTracker
Stop or clean the component.- Specified by:
processPriorToRemoval
in classAbstractComponentTracker<CyclicBuffer<E>>
-
buildComponent
protected CyclicBuffer<E> buildComponent(java.lang.String key)
Description copied from class:AbstractComponentTracker
Build a component based on the key.- Specified by:
buildComponent
in classAbstractComponentTracker<CyclicBuffer<E>>
- Returns:
-
isComponentStale
protected boolean isComponentStale(CyclicBuffer<E> eCyclicBuffer)
Description copied from class:AbstractComponentTracker
Components can declare themselves stale. Such components may be removed before they time out.- Specified by:
isComponentStale
in classAbstractComponentTracker<CyclicBuffer<E>>
- Returns:
-
liveKeysAsOrderedList
java.util.List<java.lang.String> liveKeysAsOrderedList()
-
lingererKeysAsOrderedList
java.util.List<java.lang.String> lingererKeysAsOrderedList()
-
-