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
Modifier and Type
Class
Description
`class`
`TimeBasedArchiveRemover.ArhiveRemoverRunnable`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected static final long`
`INACTIVITY_TOLERANCE_IN_MILLIS`
`protected static final long`
`UNINITIALIZED`

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

`context`

## Constructor Summary

Constructors
Constructor
Description
`TimeBasedArchiveRemover(FileNamePattern fileNamePattern, RollingCalendar rc)`

## Method Summary

Modifier and Type
Method
Description
`void`
`clean(Date now)`
`Future<?>`
`cleanAsynchronously(Date now)`
`void`
`cleanPeriod(Date dateOfPeriodToClean)`
`protected File[]`
`getFilesInPeriod(Date dateOfPeriodToClean)`
`protected int`
`getPeriodOffsetForDeletionTarget()`
`void`
`setMaxHistory(int maxHistory)`
`void`
`setTotalSizeCap(long totalSizeCap)`
`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 Details

### 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 Details

### TimeBasedArchiveRemover

public TimeBasedArchiveRemover(FileNamePattern fileNamePattern, RollingCalendar rc)

## Method Details

### clean

public void clean(Date now)

Specified by:
  `clean` in interface `ArchiveRemover`

### getFilesInPeriod

protected File[] getFilesInPeriod(Date dateOfPeriodToClean)

### cleanPeriod

public void cleanPeriod(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 String toString()

Overrides:
  `toString` in class `Object`

### cleanAsynchronously

public Future<?> cleanAsynchronously(Date now)

Specified by:
  `cleanAsynchronously` in interface `ArchiveRemover`