@Plugin(name="IdlePurgePolicy", category="Core", printObject=true) @Scheduled public class IdlePurgePolicy extends AbstractLifeCycle implements PurgePolicy, Runnable
LifeCycle.State| Constructor and Description |
|---|
IdlePurgePolicy(long timeToLive,
ConfigurationScheduler scheduler) |
| Modifier and Type | Method and Description |
|---|---|
static PurgePolicy |
createPurgePolicy(String timeToLive,
String timeUnit,
Configuration configuration)
Create the PurgePolicy
|
void |
initialize(RoutingAppender routingAppender)
Initialize with routing appender
|
void |
purge()
Purging appenders that were not in use specified time
|
void |
run() |
void |
stop() |
String |
toString() |
void |
update(String key,
LogEvent event) |
equalsImpl, getState, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, startpublic IdlePurgePolicy(long timeToLive,
ConfigurationScheduler scheduler)
public void initialize(RoutingAppender routingAppender)
PurgePolicyinitialize in interface PurgePolicypublic void stop()
stop in interface LifeCyclestop in class AbstractLifeCyclepublic void purge()
purge in interface PurgePolicypublic void update(String key, LogEvent event)
update in interface PurgePolicy@PluginFactory public static PurgePolicy createPurgePolicy(@PluginAttribute(value="timeToLive") String timeToLive, @PluginAttribute(value="timeUnit") String timeUnit, @PluginConfiguration Configuration configuration)
timeToLive - the number of increments of timeUnit before the Appender should be purged.timeUnit - the unit of time the timeToLive is expressed in.Copyright © 1999-2015 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.