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 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 implement
buildComponent(String)
, processPriorToRemoval(Object)
, and isComponentStale(Object)
methods as appropriate for their component type.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
Deprecated.static final long
Deprecated.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 -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Returns the collection of all components tracked by this instance.allKeys()
Deprecated.Set of all keys in this tracker in no particular order.void
Deprecated.Mark component identified by 'key' as having reached its end-of-life.Deprecated.Find the component identified by 'key', without updating the timestamp.int
Deprecated.Returns the number of components tracked.int
Deprecated.getOrCreate
(String key, long timestamp) Deprecated.Get the component identified by 'key', updating its timestamp in the process.long
Deprecated.void
removeStaleComponents
(long now) Deprecated.Clear (and detach) components which are stale.void
setMaxComponents
(int maxComponents) Deprecated.void
setTimeout
(long timeout) Deprecated.
-
Field Details
-
LINGERING_TIMEOUT
public static final long LINGERING_TIMEOUTDeprecated.- See Also:
-
WAIT_BETWEEN_SUCCESSIVE_REMOVAL_ITERATIONS
public static final long WAIT_BETWEEN_SUCCESSIVE_REMOVAL_ITERATIONSDeprecated.The minimum amount of time that has to elapse between successive removal iterations.- See Also:
-
-
Constructor Details
-
AbstractComponentTracker
public AbstractComponentTracker()Deprecated.
-
-
Method Details
-
getComponentCount
public int getComponentCount()Deprecated.Description copied from interface:ComponentTracker
Returns the number of components tracked.- Specified by:
getComponentCount
in interfaceComponentTracker<C>
- Returns:
- number of components
-
find
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:
find
in interfaceComponentTracker<C>
- Parameters:
key
-- Returns:
- corresponding component, may be null
-
getOrCreate
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:
getOrCreate
in interfaceComponentTracker<C>
- Parameters:
key
-timestamp
-- Returns:
-
endOfLife
Deprecated.Mark component identified by 'key' as having reached its end-of-life.- Specified by:
endOfLife
in 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:
removeStaleComponents
in interfaceComponentTracker<C>
- Parameters:
now
-
-
allKeys
Deprecated.Description copied from interface:ComponentTracker
Set of all keys in this tracker in no particular order.- Specified by:
allKeys
in interfaceComponentTracker<C>
- Returns:
-
allComponents
Deprecated.Description copied from interface:ComponentTracker
Returns the collection of all components tracked by this instance.- Specified by:
allComponents
in 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.
-