public class TimeBasedArchiveRemover extends ContextAwareBase implements ArchiveRemover
Modifier and Type | Class and Description |
---|---|
class |
TimeBasedArchiveRemover.ArhiveRemoverRunnable |
Modifier and Type | Field and Description |
---|---|
protected static long |
INACTIVITY_TOLERANCE_IN_MILLIS |
protected static long |
UNINITIALIZED |
context
Constructor and Description |
---|
TimeBasedArchiveRemover(FileNamePattern fileNamePattern,
RollingCalendar rc) |
Modifier and Type | Method and Description |
---|---|
void |
clean(Date now) |
Future<?> |
cleanAsynchronously(Date now) |
void |
cleanPeriod(Date dateOfPeriodToClean) |
protected void |
descendingSort(File[] matchingFileArray,
Date date) |
protected File[] |
getFilesInPeriod(Date dateOfPeriodToClean) |
protected int |
getPeriodOffsetForDeletionTarget() |
void |
setMaxHistory(int maxHistory) |
void |
setTotalSizeCap(long totalSizeCap) |
String |
toString() |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
protected static final long UNINITIALIZED
protected static final long INACTIVITY_TOLERANCE_IN_MILLIS
public TimeBasedArchiveRemover(FileNamePattern fileNamePattern, RollingCalendar rc)
public void clean(Date now)
clean
in interface ArchiveRemover
public void cleanPeriod(Date dateOfPeriodToClean)
public void setMaxHistory(int maxHistory)
setMaxHistory
in interface ArchiveRemover
protected int getPeriodOffsetForDeletionTarget()
public void setTotalSizeCap(long totalSizeCap)
setTotalSizeCap
in interface ArchiveRemover
public Future<?> cleanAsynchronously(Date now)
cleanAsynchronously
in interface ArchiveRemover