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

public abstract Class TimeBasedFileNamingAndTriggeringPolicyBase<E>

extends ContextAwareBase
implements TimeBasedFileNamingAndTriggeringPolicy<E>
Class Inheritance
All Implemented Interfaces
ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicy, ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.rolling.TriggeringPolicy, ch.qos.logback.core.spi.LifeCycle
Known Direct Subclasses
ch.qos.logback.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy, ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP
Static Imports
ch.qos.logback.core.CoreConstants.CODES_URL

Field Summary

Modifier and TypeField and Description
protected ArchiveRemover
protected long
protected AtomicLong
private static String
protected Instant
protected String
protected boolean
protected RollingCalendar
protected boolean
protected TimeBasedRollingPolicy<E>
Inherited from ch.qos.logback.core.spi.ContextAwareBase:
context

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected long
computeNextCheck(long timestamp)

public ArchiveRemover
getArchiveRemover()

Implements ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicy.getArchiveRemover.

Return the archive remover appropriate for this instance.
public String
public long
getCurrentTime()

Implements ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicy.getCurrentTime.

Return the current time which is usually the value returned by System.currentMillis().
public String
protected boolean
public boolean
public void
protected void
setDateInCurrentPeriod(long timestamp)

public void
public void
public void
protected void
Inherited from ch.qos.logback.core.spi.ContextAwareBase:
addErroraddErroraddInfoaddInfoaddStatusaddWarnaddWarngetContextgetDeclaredOrigingetStatusManagersetContext

Field Detail

archiveRemoverback to summary
protected ArchiveRemover archiveRemover
artificialCurrentTimeback to summary
protected long artificialCurrentTime
atomicNextCheckback to summary
protected AtomicLong atomicNextCheck
COLLIDING_DATE_FORMAT_URLback to summary
private static String COLLIDING_DATE_FORMAT_URL
dateInCurrentPeriodback to summary
protected Instant dateInCurrentPeriod
elapsedPeriodsFileNameback to summary
protected String elapsedPeriodsFileName
errorFreeback to summary
protected boolean errorFree
rcback to summary
protected RollingCalendar rc
startedback to summary
protected boolean started
tbrpback to summary
protected TimeBasedRollingPolicy<E> tbrp

Constructor Detail

TimeBasedFileNamingAndTriggeringPolicyBaseback to summary
public TimeBasedFileNamingAndTriggeringPolicyBase()

Method Detail

computeNextCheckback to summary
protected long computeNextCheck(long timestamp)
getArchiveRemoverback to summary
public ArchiveRemover getArchiveRemover()

Implements ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicy.getArchiveRemover.

Doc from ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicy.getArchiveRemover.

Return the archive remover appropriate for this instance.

getCurrentPeriodsFileNameWithoutCompressionSuffixback to summary
public String getCurrentPeriodsFileNameWithoutCompressionSuffix()

Implements ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicy.getCurrentPeriodsFileNameWithoutCompressionSuffix.

Doc from ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicy.getCurrentPeriodsFileNameWithoutCompressionSuffix.

Return the current periods file name without the compression suffix. This value is equivalent to the active file name.

Returns:String

current period's file name (without compression suffix)

getCurrentTimeback to summary
public long getCurrentTime()

Implements ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicy.getCurrentTime.

Doc from ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicy.getCurrentTime.

Return the current time which is usually the value returned by System.currentMillis(). However, for testing purposed this value may be different than the real time.

Returns:long

current time value

getElapsedPeriodsFileNameback to summary
public String getElapsedPeriodsFileName()

Implements ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicy.getElapsedPeriodsFileName.

Doc from ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicy.getElapsedPeriodsFileName.

Return the file name for the elapsed periods file name.

isErrorFreeback to summary
protected boolean isErrorFree()
isStartedback to summary
public boolean isStarted()

Implements ch.qos.logback.core.spi.LifeCycle.isStarted.

setCurrentTimeback to summary
public void setCurrentTime(long timeInMillis)

Implements ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicy.setCurrentTime.

Doc from ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicy.setCurrentTime.

Set the current time. Only unit tests should invoke this method.

setDateInCurrentPeriodback to summary
protected void setDateInCurrentPeriod(long timestamp)
setTimeBasedRollingPolicyback to summary
public void setTimeBasedRollingPolicy(TimeBasedRollingPolicy<E> _tbrp)

Implements ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicy.setTimeBasedRollingPolicy.

Doc from ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicy.setTimeBasedRollingPolicy.

Set the host/parent TimeBasedRollingPolicy.

Parameters
_tbrp:TimeBasedRollingPolicy<E>

parent TimeBasedRollingPolicy

startback to summary
public void start()

Implements ch.qos.logback.core.spi.LifeCycle.start.

stopback to summary
public void stop()

Implements ch.qos.logback.core.spi.LifeCycle.stop.

withErrorsback to summary
protected void withErrors()