Module ch.qos.logback.core
Class SizeAndTimeBasedArchiveRemover
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.rolling.helper.TimeBasedArchiveRemover
-
- ch.qos.logback.core.rolling.helper.SizeAndTimeBasedArchiveRemover
-
- All Implemented Interfaces:
ArchiveRemover,ContextAware
public class SizeAndTimeBasedArchiveRemover extends TimeBasedArchiveRemover
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ch.qos.logback.core.rolling.helper.TimeBasedArchiveRemover
TimeBasedArchiveRemover.ArchiveRemoverRunnable
-
-
Field Summary
Fields Modifier and Type Field Description protected static intNO_INDEX-
Fields inherited from class ch.qos.logback.core.rolling.helper.TimeBasedArchiveRemover
INACTIVITY_TOLERANCE_IN_MILLIS, UNINITIALIZED
-
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
-
Constructor Summary
Constructors Constructor Description SizeAndTimeBasedArchiveRemover(FileNamePattern fileNamePattern, FileNamePattern fileNamePatternWithoutCompSuffix, RollingCalendar rc)SizeAndTimeBasedArchiveRemover(FileNamePattern fileNamePattern, RollingCalendar rc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddescendingSort(File[] matchingFileArray, Instant instant)protected File[]getFilesInPeriod(Instant instantOfPeriodToClean)protected File[]getUncompressedFilesInPeriod(Instant instantOfPeriodToClean)Returns files of the given period which were not compressed, e.g. because the application was down at rollover time.-
Methods inherited from class ch.qos.logback.core.rolling.helper.TimeBasedArchiveRemover
clean, cleanAsynchronously, cleanPeriod, getPeriodOffsetForDeletionTarget, setMaxHistory, setTotalSizeCap, toString
-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
-
-
-
Field Detail
-
NO_INDEX
protected static final int NO_INDEX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SizeAndTimeBasedArchiveRemover
public SizeAndTimeBasedArchiveRemover(FileNamePattern fileNamePattern, RollingCalendar rc)
-
SizeAndTimeBasedArchiveRemover
public SizeAndTimeBasedArchiveRemover(FileNamePattern fileNamePattern, FileNamePattern fileNamePatternWithoutCompSuffix, RollingCalendar rc)
- Since:
- 1.7.0
-
-
Method Detail
-
getFilesInPeriod
protected File[] getFilesInPeriod(Instant instantOfPeriodToClean)
- Overrides:
getFilesInPeriodin classTimeBasedArchiveRemover
-
getUncompressedFilesInPeriod
protected File[] getUncompressedFilesInPeriod(Instant instantOfPeriodToClean)
Description copied from class:TimeBasedArchiveRemoverReturns files of the given period which were not compressed, e.g. because the application was down at rollover time. Returns an empty array if there is no compression.Only called for periods older than maxHistory. Such files are neither the active file nor being compressed.
- Overrides:
getUncompressedFilesInPeriodin classTimeBasedArchiveRemover
-
descendingSort
protected void descendingSort(File[] matchingFileArray, Instant instant)
- Overrides:
descendingSortin classTimeBasedArchiveRemover
-
-