-
- All Superinterfaces:
LifeCycle
- All Known Subinterfaces:
TimeBasedFileNamingAndTriggeringPolicy<E>
- All Known Implementing Classes:
DefaultTimeBasedFileNamingAndTriggeringPolicy,SizeAndTimeBasedFileNamingAndTriggeringPolicy,SizeAndTimeBasedFNATP,SizeAndTimeBasedRollingPolicy,SizeBasedTriggeringPolicy,TimeBasedFileNamingAndTriggeringPolicyBase,TimeBasedRollingPolicy,TriggeringPolicyBase
public interface TriggeringPolicy<E> extends LifeCycle
ATriggeringPolicycontrols the conditions under which roll-over occurs. Such conditions include time of day, file size, an external event, the log request or a combination thereof.- Author:
- Ceki Gülcü
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default LengthCountergetLengthCounter()Return theLengthCounterinstance associated with this triggering policy.booleanisTriggeringEvent(File activeFile, E event)Should roll-over be triggered at this time?
-
-
-
Method Detail
-
getLengthCounter
default LengthCounter getLengthCounter()
Return theLengthCounterinstance associated with this triggering policy. The returned value may be null.- Returns:
- a LengthCounter instance, may be null
- Since:
- 1.5.8
-
isTriggeringEvent
boolean isTriggeringEvent(File activeFile, E event)
Should roll-over be triggered at this time?- Parameters:
activeFile- A reference to the currently active log file.event- A reference to the current event.- Returns:
- true if a roll-over should occur.
-
-