public abstract class AbstractManager extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
count
Number of Appenders using this manager.
|
protected static org.apache.logging.log4j.Logger |
LOGGER
Allow subclasses access to the status logger without creating another instance.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractManager(String name) |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getContentFormat()
Provide a description of the content format supported by this Manager.
|
protected int |
getCount() |
static <M extends AbstractManager,T> |
getManager(String name,
ManagerFactory<M,T> factory,
T data)
Retrieves a Manager if it has been previously created or creates a new Manager.
|
String |
getName()
Returns the name of the Manager.
|
static boolean |
hasManager(String name)
Determines if a Manager with the specified name exists.
|
void |
release()
Called to signify that this Manager is no longer required by an Appender.
|
protected void |
releaseSub()
May be overridden by Managers to perform processing while the Manager is being released and the
lock is held.
|
protected static final org.apache.logging.log4j.Logger LOGGER
protected int count
protected AbstractManager(String name)
public static <M extends AbstractManager,T> M getManager(String name, ManagerFactory<M,T> factory, T data)
M
- The Type of the Manager to be created.T
- The type of the Factory data.name
- The name of the Manager to retrieve.factory
- The Factory to use to create the Manager.data
- An Object that should be passed to the factory when creating the Manager.public static boolean hasManager(String name)
name
- The name of the Manager.protected void releaseSub()
protected int getCount()
public void release()
public Map<String,String> getContentFormat()
Copyright © 1999-2021 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.