Interface TriggeringPolicy
- All Known Implementing Classes:
AbstractTriggeringPolicy
,CompositeTriggeringPolicy
,CronTriggeringPolicy
,NoOpTriggeringPolicy
,OnStartupTriggeringPolicy
,SizeBasedTriggeringPolicy
,TimeBasedTriggeringPolicy
public interface TriggeringPolicy
A
TriggeringPolicy
controls the conditions under which rollover
occurs. Such conditions include time of day, file size, an
external event, the log request or a combination thereof.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
initialize
(RollingFileManager manager) Initializes this triggering policy.boolean
isTriggeringEvent
(LogEvent logEvent) Determines if a rollover may be appropriate at this time.
-
Method Details
-
initialize
Initializes this triggering policy.- Parameters:
manager
- The RollingFileManager.
-
isTriggeringEvent
Determines if a rollover may be appropriate at this time. If true is returned, RolloverPolicy.rollover will be called but it can determine that a rollover is not warranted.- Parameters:
logEvent
- A reference to the current log event.- Returns:
- true if a rollover should occur.
-