@Plugin(name="TimeBasedTriggeringPolicy", category="Core", printObject=true) public final class TimeBasedTriggeringPolicy extends Object implements TriggeringPolicy
Modifier and Type | Method and Description |
---|---|
static TimeBasedTriggeringPolicy |
createPolicy(String interval,
String modulate)
Creates a TimeBasedTriggeringPolicy.
|
int |
getInterval() |
long |
getNextRolloverMillis() |
void |
initialize(RollingFileManager aManager)
Initializes the policy.
|
boolean |
isTriggeringEvent(LogEvent event)
Determines whether a rollover should occur.
|
String |
toString() |
public int getInterval()
public long getNextRolloverMillis()
public void initialize(RollingFileManager aManager)
initialize
in interface TriggeringPolicy
aManager
- The RollingFileManager.public boolean isTriggeringEvent(LogEvent event)
isTriggeringEvent
in interface TriggeringPolicy
event
- A reference to the currently event.@PluginFactory public static TimeBasedTriggeringPolicy createPolicy(@PluginAttribute(value="interval") String interval, @PluginAttribute(value="modulate") String modulate)
interval
- The interval between rollovers.modulate
- If true the time will be rounded to occur on a boundary aligned with the increment.Copyright © 1999-2017 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.