TriggeringPolicy, LifeCycle, LifeCycle2@Plugin(name="CronTriggeringPolicy", category="Core", printObject=true) @Scheduled public final class CronTriggeringPolicy extends AbstractTriggeringPolicy
LifeCycle.StateDEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGER| Modifier and Type | Method | Description |
|---|---|---|
static CronTriggeringPolicy |
createPolicy(Configuration configuration,
String evaluateOnStartup,
String schedule) |
Creates a ScheduledTriggeringPolicy.
|
CronExpression |
getCronExpression() |
|
void |
initialize(RollingFileManager aManager) |
Initializes the policy.
|
boolean |
isTriggeringEvent(LogEvent event) |
Determines whether a rollover should occur.
|
boolean |
stop(long timeout,
TimeUnit timeUnit) |
Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current
thread is interrupted, whichever happens first.
|
String |
toString() |
equalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, start, stop, stoppublic void initialize(RollingFileManager aManager)
aManager - The RollingFileManager.public boolean isTriggeringEvent(LogEvent event)
event - A reference to the currently event.public CronExpression getCronExpression()
@PluginFactory public static CronTriggeringPolicy createPolicy(@PluginConfiguration Configuration configuration, @PluginAttribute("evaluateOnStartup") String evaluateOnStartup, @PluginAttribute("schedule") String schedule)
configuration - the Configuration.evaluateOnStartup - check if the file should be rolled over immediately.schedule - the cron expression.public boolean stop(long timeout,
TimeUnit timeUnit)
LifeCycle2stop in interface LifeCycle2stop in class AbstractLifeCycletimeout - the maximum time to waittimeUnit - the time unit of the timeout argumentCopyright © 1999-2018. 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.