Package ch.qos.logback.core.rolling.helper

## Class TimeBasedArchiveRemover

- java.lang.Object
- - ch.qos.logback.core.spi.ContextAwareBase
  - - ch.qos.logback.core.rolling.helper.TimeBasedArchiveRemover

All Implemented Interfaces:
  `ArchiveRemover`, `ContextAware`

Direct Known Subclasses:
  `SizeAndTimeBasedArchiveRemover`

    public class TimeBasedArchiveRemover
    extends ContextAwareBase
    implements ArchiveRemover

### Nested Class Summary

Nested Classes
`class` `TimeBasedArchiveRemover.ArhiveRemoverRunnable`

### Field Summary

Fields
`protected static long` `INACTIVITY_TOLERANCE_IN_MILLIS`
`protected static long` `UNINITIALIZED`

### Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

`context`

### Constructor Summary

Constructors
`TimeBasedArchiveRemover​(FileNamePattern fileNamePattern, RollingCalendar rc)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `clean​(java.util.Date now)`
`java.util.concurrent.Future<?>` `cleanAsynchronously​(java.util.Date now)`
`void` `cleanPeriod​(java.util.Date dateOfPeriodToClean)`
`protected java.io.File[]` `getFilesInPeriod​(java.util.Date dateOfPeriodToClean)`
`protected int` `getPeriodOffsetForDeletionTarget()`
`void` `setMaxHistory​(int maxHistory)`
`void` `setTotalSizeCap​(long totalSizeCap)`
`java.lang.String` `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

#### UNINITIALIZED

    protected static final long UNINITIALIZED

See Also:
  Constant Field Values

#### INACTIVITY_TOLERANCE_IN_MILLIS

    protected static final long INACTIVITY_TOLERANCE_IN_MILLIS

See Also:
  Constant Field Values

### Constructor Detail

#### TimeBasedArchiveRemover

    public TimeBasedArchiveRemover​(FileNamePattern fileNamePattern,
                                   RollingCalendar rc)

### Method Detail

#### clean

    public void clean​(java.util.Date now)

Specified by:
  `clean` in interface `ArchiveRemover`

#### getFilesInPeriod

    protected java.io.File[] getFilesInPeriod​(java.util.Date dateOfPeriodToClean)

#### cleanPeriod

    public void cleanPeriod​(java.util.Date dateOfPeriodToClean)

#### setMaxHistory

    public void setMaxHistory​(int maxHistory)

Specified by:
  `setMaxHistory` in interface `ArchiveRemover`

#### getPeriodOffsetForDeletionTarget

    protected int getPeriodOffsetForDeletionTarget()

#### setTotalSizeCap

    public void setTotalSizeCap​(long totalSizeCap)

Specified by:
  `setTotalSizeCap` in interface `ArchiveRemover`

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### cleanAsynchronously

    public java.util.concurrent.Future<?> cleanAsynchronously​(java.util.Date now)

Specified by:
  `cleanAsynchronously` in interface `ArchiveRemover`