TriggeringPolicy
, LifeCycle
, LifeCycle2
@Plugin(name="Policies", category="Core", printObject=true) public final class CompositeTriggeringPolicy extends AbstractTriggeringPolicy
LifeCycle.State
DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGER
Modifier and Type | Method | Description |
---|---|---|
static CompositeTriggeringPolicy |
createPolicy(TriggeringPolicy... triggeringPolicy) |
Creates a CompositeTriggeringPolicy.
|
TriggeringPolicy[] |
getTriggeringPolicies() |
|
void |
initialize(RollingFileManager manager) |
Initializes the policy.
|
boolean |
isTriggeringEvent(LogEvent event) |
Determines if 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, stop
public TriggeringPolicy[] getTriggeringPolicies()
public void initialize(RollingFileManager manager)
manager
- The RollingFileManager.public boolean isTriggeringEvent(LogEvent event)
event
- A reference to the currently event.@PluginFactory public static CompositeTriggeringPolicy createPolicy(@PluginElement("Policies") TriggeringPolicy... triggeringPolicy)
triggeringPolicy
- The triggering policies.public boolean stop(long timeout, TimeUnit timeUnit)
LifeCycle2
stop
in interface LifeCycle2
stop
in class AbstractLifeCycle
timeout
- 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.