Package ch.qos.logback.core.spi
Class AbstractComponentTracker<C>
- java.lang.Object
-
- ch.qos.logback.core.spi.AbstractComponentTracker<C>
-
- Type Parameters:
C- component type
- All Implemented Interfaces:
ComponentTracker<C>
- Direct Known Subclasses:
AppenderTracker,CyclicBufferTracker
@Deprecated(since="2022-01-27") public abstract class AbstractComponentTracker<C> extends java.lang.Object implements ComponentTracker<C>
Deprecated.This internal logback API is not supported by AEM as a Cloud Service.An abstract implementation of the ComponentTracker interface. Derived classes must implementbuildComponent(String),processPriorToRemoval(Object), andisComponentStale(Object)methods as appropriate for their component type.
-
-
Field Summary
Fields Modifier and Type Field Description static longLINGERING_TIMEOUTDeprecated.static longWAIT_BETWEEN_SUCCESSIVE_REMOVAL_ITERATIONSDeprecated.The minimum amount of time that has to elapse between successive removal iterations.-
Fields inherited from interface ch.qos.logback.core.spi.ComponentTracker
DEFAULT_MAX_COMPONENTS, DEFAULT_TIMEOUT
-
-
Constructor Summary
Constructors Constructor Description AbstractComponentTracker()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Collection<C>allComponents()Deprecated.Returns the collection of all components tracked by this instance.java.util.Set<java.lang.String>allKeys()Deprecated.Set of all keys in this tracker in no particular order.voidendOfLife(java.lang.String key)Deprecated.Mark component identified by 'key' as having reached its end-of-life.Cfind(java.lang.String key)Deprecated.Find the component identified by 'key', without updating the timestamp.intgetComponentCount()Deprecated.Returns the number of components tracked.intgetMaxComponents()Deprecated.CgetOrCreate(java.lang.String key, long timestamp)Deprecated.Get the component identified by 'key', updating its timestamp in the process.longgetTimeout()Deprecated.voidremoveStaleComponents(long now)Deprecated.Clear (and detach) components which are stale.voidsetMaxComponents(int maxComponents)Deprecated.voidsetTimeout(long timeout)Deprecated.
-
-
-
Field Detail
-
LINGERING_TIMEOUT
public static final long LINGERING_TIMEOUT
Deprecated.- See Also:
- Constant Field Values
-
WAIT_BETWEEN_SUCCESSIVE_REMOVAL_ITERATIONS
public static final long WAIT_BETWEEN_SUCCESSIVE_REMOVAL_ITERATIONS
Deprecated.The minimum amount of time that has to elapse between successive removal iterations.- See Also:
- Constant Field Values
-
-
Method Detail
-
getComponentCount
public int getComponentCount()
Deprecated.Description copied from interface:ComponentTrackerReturns the number of components tracked.- Specified by:
getComponentCountin interfaceComponentTracker<C>- Returns:
- number of components
-
find
public C find(java.lang.String key)
Deprecated.Find the component identified by 'key', without updating the timestamp. Returns null if no corresponding component could be found.Note that this method is synchronized.
- Specified by:
findin interfaceComponentTracker<C>- Parameters:
key-- Returns:
- corresponding component, may be null
-
getOrCreate
public C getOrCreate(java.lang.String key, long timestamp)
Deprecated.Get the component identified by 'key', updating its timestamp in the process. If the corresponding component could not be found, it is created.Note that this method is atomic, i.e. synchronized.
- Specified by:
getOrCreatein interfaceComponentTracker<C>- Parameters:
key-timestamp-- Returns:
-
endOfLife
public void endOfLife(java.lang.String key)
Deprecated.Mark component identified by 'key' as having reached its end-of-life.- Specified by:
endOfLifein interfaceComponentTracker<C>- Parameters:
key-
-
removeStaleComponents
public void removeStaleComponents(long now)
Deprecated.Clear (and detach) components which are stale. Components which have not been accessed for more than a user-specified duration are deemed stale.- Specified by:
removeStaleComponentsin interfaceComponentTracker<C>- Parameters:
now-
-
allKeys
public java.util.Set<java.lang.String> allKeys()
Deprecated.Description copied from interface:ComponentTrackerSet of all keys in this tracker in no particular order.- Specified by:
allKeysin interfaceComponentTracker<C>- Returns:
-
allComponents
public java.util.Collection<C> allComponents()
Deprecated.Description copied from interface:ComponentTrackerReturns the collection of all components tracked by this instance.- Specified by:
allComponentsin interfaceComponentTracker<C>- Returns:
- collection of components
-
getTimeout
public long getTimeout()
Deprecated.
-
setTimeout
public void setTimeout(long timeout)
Deprecated.
-
getMaxComponents
public int getMaxComponents()
Deprecated.
-
setMaxComponents
public void setMaxComponents(int maxComponents)
Deprecated.
-
-