Top Description Methods
ch.qos.logback.core.rolling

public Interface TimeBasedFileNamingAndTriggeringPolicy<E>

extends TriggeringPolicy<E>, ContextAware
Known Direct Implementers
ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicyBase
Imports
ch.qos.logback.core.rolling.helper.ArchiveRemover, ch.qos.logback.core.spi.ContextAware

This interface lists the set of methods that need to be implemented by triggering policies which are nested within a TimeBasedRollingPolicy.
Author
Ceki Gülcü

Method Summary

Modifier and TypeMethod and Description
public ArchiveRemover
getArchiveRemover()

Return the archive remover appropriate for this instance.

public String

Returns:

current period's file name (without compression suffix)
getCurrentPeriodsFileNameWithoutCompressionSuffix
()

Return the current periods file name without the compression suffix.

public long

Returns:

current time value
getCurrentTime
()

Return the current time which is usually the value returned by System.currentMillis().

public String
getElapsedPeriodsFileName()

Return the file name for the elapsed periods file name.

public void
setCurrentTime(long now)

Set the current time.

public void
setTimeBasedRollingPolicy(TimeBasedRollingPolicy<E>
parent TimeBasedRollingPolicy
tbrp
)

Set the host/parent TimeBasedRollingPolicy.

Inherited from ch.qos.logback.core.rolling.TriggeringPolicy:
isTriggeringEvent
Inherited from ch.qos.logback.core.spi.ContextAware:
addErroraddErroraddInfoaddInfoaddStatusaddWarnaddWarngetContextsetContext

Method Detail

getArchiveRemoverback to summary
public ArchiveRemover getArchiveRemover()

Return the archive remover appropriate for this instance.

getCurrentPeriodsFileNameWithoutCompressionSuffixback to summary
public String 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()

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()

Return the file name for the elapsed periods file name.

setCurrentTimeback to summary
public void setCurrentTime(long now)

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

setTimeBasedRollingPolicyback to summary
public void setTimeBasedRollingPolicy(TimeBasedRollingPolicy<E> tbrp)

Set the host/parent TimeBasedRollingPolicy.

Parameters
tbrp:TimeBasedRollingPolicy<E>

parent TimeBasedRollingPolicy