Top Inners Fields Constructors Methods
ch.qos.logback.core.rolling.helper

public Class TimeBasedArchiveRemover

extends ContextAwareBase
implements ArchiveRemover
Class Inheritance
All Implemented Interfaces
ch.qos.logback.core.rolling.helper.ArchiveRemover, ch.qos.logback.core.spi.ContextAware
Known Direct Subclasses
ch.qos.logback.core.rolling.helper.SizeAndTimeBasedArchiveRemover
Static Imports
ch.qos.logback.core.CoreConstants.UNBOUNDED_TOTAL_SIZE_CAP

Nested and Inner Type Summary

Modifier and TypeClass and Description
public class

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv final FileNamePattern
protected static final long
pack-priv long
pack-priv static final int
private int
pack-priv final boolean
pack-priv final RollingCalendar
private long
protected static final long
Inherited from ch.qos.logback.core.spi.ContextAwareBase:
context

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
private boolean
public void
clean(Instant now)

Implements ch.qos.logback.core.rolling.helper.ArchiveRemover.clean.

Called from the cleaning thread.
public Future<?>
public void
cleanPeriod(Instant instantOfPeriodToClean)

pack-priv int
pack-priv boolean
computeParentCleaningFlag(FileNamePattern fileNamePattern)

Computes whether the fileNamePattern may create sub-folders.

protected void
descendingSort(File[] matchingFileArray, Instant instant)

private boolean
protected File[]
getFilesInPeriod(Instant instantOfPeriodToClean)

pack-priv File
protected int
pack-priv void
private void
removeFolderIfEmpty(File dir, int depth)

Will remove the directory passed as parameter if empty.

public void
public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from ch.qos.logback.core.spi.ContextAwareBase:
addErroraddErroraddInfoaddInfoaddStatusaddWarnaddWarngetContextgetDeclaredOrigingetStatusManagersetContext

Field Detail

callCountback to summary
pack-priv int callCount
fileNamePatternback to summary
pack-priv final FileNamePattern fileNamePattern
INACTIVITY_TOLERANCE_IN_MILLISback to summary
protected static final long INACTIVITY_TOLERANCE_IN_MILLIS
lastHeartBeatback to summary
pack-priv long lastHeartBeat
MAX_VALUE_FOR_INACTIVITY_PERIODSback to summary
pack-priv static final int MAX_VALUE_FOR_INACTIVITY_PERIODS
maxHistoryback to summary
private int maxHistory
parentCleanback to summary
pack-priv final boolean parentClean
rcback to summary
pack-priv final RollingCalendar rc
totalSizeCapback to summary
private long totalSizeCap
UNINITIALIZEDback to summary
protected static final long UNINITIALIZED

Constructor Detail

TimeBasedArchiveRemoverback to summary
public TimeBasedArchiveRemover(FileNamePattern fileNamePattern, RollingCalendar rc)

Method Detail

capTotalSizeback to summary
pack-priv void capTotalSize(Instant now)
checkAndDeleteFileback to summary
private boolean checkAndDeleteFile(File f)
cleanback to summary
public void clean(Instant now)

Implements ch.qos.logback.core.rolling.helper.ArchiveRemover.clean.

Called from the cleaning thread.

Annotations
@Override
cleanAsynchronouslyback to summary
public Future<?> cleanAsynchronously(Instant now)

Implements ch.qos.logback.core.rolling.helper.ArchiveRemover.cleanAsynchronously.

cleanPeriodback to summary
public void cleanPeriod(Instant instantOfPeriodToClean)
computeElapsedPeriodsSinceLastCleanback to summary
pack-priv int computeElapsedPeriodsSinceLastClean(long nowInMillis)
computeParentCleaningFlagback to summary
pack-priv boolean computeParentCleaningFlag(FileNamePattern fileNamePattern)

Computes whether the fileNamePattern may create sub-folders.

descendingSortback to summary
protected void descendingSort(File[] matchingFileArray, Instant instant)
fileExistsAndIsFileback to summary
private boolean fileExistsAndIsFile(File file2Delete)
getFilesInPeriodback to summary
protected File[] getFilesInPeriod(Instant instantOfPeriodToClean)
getParentDirback to summary
pack-priv File getParentDir(File file)
getPeriodOffsetForDeletionTargetback to summary
protected int getPeriodOffsetForDeletionTarget()
removeFolderIfEmptyback to summary
pack-priv void removeFolderIfEmpty(File dir)
removeFolderIfEmptyback to summary
private void removeFolderIfEmpty(File dir, int depth)

Will remove the directory passed as parameter if empty. After that, if the parent is also becomes empty, remove the parent dir as well but at most 3 times.

setMaxHistoryback to summary
public void setMaxHistory(int maxHistory)

Implements ch.qos.logback.core.rolling.helper.ArchiveRemover.setMaxHistory.

setTotalSizeCapback to summary
public void setTotalSizeCap(long totalSizeCap)

Implements ch.qos.logback.core.rolling.helper.ArchiveRemover.setTotalSizeCap.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

ch.qos.logback.core.rolling.helper back to summary

public Class TimeBasedArchiveRemover.ArchiveRemoverRunnable

extends Object
implements Runnable
Class Inheritance
  • java.lang.Object
  • ch.qos.logback.core.rolling.helper.TimeBasedArchiveRemover.ArchiveRemoverRunnable
All Implemented Interfaces
java.lang.Runnable

Field Summary

Modifier and TypeField and Description
pack-priv Instant

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

nowback to summary
pack-priv Instant now

Constructor Detail

ArchiveRemoverRunnableback to summary
pack-priv ArchiveRemoverRunnable(Instant now)

Method Detail

runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override