public abstract class TimeBasedFileNamingAndTriggeringPolicyBase<E> extends ContextAwareBaseimplements TimeBasedFileNamingAndTriggeringPolicy <E>
| Modifier and Type | Field and Description |
|---|---|
protected ArchiveRemover |
archiveRemover
|
protected long |
artificialCurrentTime
|
protected Date |
dateInCurrentPeriod
|
protected String |
elapsedPeriodsFileName
|
protected long |
nextCheck
|
protected RollingCalendar |
rc
|
protected boolean |
started
|
protected TimeBasedRollingPolicy |
tbrp
|
context| Constructor and Description |
|---|
TimeBasedFileNamingAndTriggeringPolicyBase()
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
computeNextCheck()
|
ArchiveRemover |
getArchiveRemover()
Return the archive remover appropriate for this instance.
|
String |
getCurrentPeriodsFileNameWithoutCompressionSuffix()
Return the current periods file name without the compression suffix.
|
long |
getCurrentTime()
Return the current time which is usually the value returned by System.currentMillis().
|
String |
getElapsedPeriodsFileName()
Return the file name for the elapsed periods file name.
|
boolean |
isStarted()
|
void |
setCurrentTime(long timeInMillis)
Set the current time.
|
void |
setDateInCurrentPeriod(Date
|
protected void |
setDateInCurrentPeriod(long now)
|
void |
setTimeBasedRollingPolicy(TimeBasedRollingPolicy
Set the host/parent
TimeBasedRollingPolicy.
|
void |
start()
|
void |
stop()
|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisTriggeringEventaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContextprotected TimeBasedRollingPolicy<E> tbrp
protected ArchiveRemoverarchiveRemover
protected StringelapsedPeriodsFileName
protected RollingCalendarrc
protected long artificialCurrentTime
protected DatedateInCurrentPeriod
protected long nextCheck
protected boolean started
public TimeBasedFileNamingAndTriggeringPolicyBase()
public boolean isStarted()
public void start()
public void stop()
protected void computeNextCheck()
protected void setDateInCurrentPeriod(long now)
public void setDateInCurrentPeriod(Date_dateInCurrentPeriod)
public StringgetElapsedPeriodsFileName()
TimeBasedFileNamingAndTriggeringPolicy
getElapsedPeriodsFileName in interface
TimeBasedFileNamingAndTriggeringPolicy<E>
public StringgetCurrentPeriodsFileNameWithoutCompressionSuffix()
TimeBasedFileNamingAndTriggeringPolicy
getCurrentPeriodsFileNameWithoutCompressionSuffix in interface
TimeBasedFileNamingAndTriggeringPolicy<E>
public void setCurrentTime(long timeInMillis)
TimeBasedFileNamingAndTriggeringPolicy
public long getCurrentTime()
TimeBasedFileNamingAndTriggeringPolicy
getCurrentTime in interface
TimeBasedFileNamingAndTriggeringPolicy<E>
public void setTimeBasedRollingPolicy(TimeBasedRollingPolicy<E> _tbrp)
TimeBasedFileNamingAndTriggeringPolicy
TimeBasedRollingPolicy.
setTimeBasedRollingPolicy in interface
TimeBasedFileNamingAndTriggeringPolicy<E>
_tbrp - parent TimeBasedRollingPolicy
public ArchiveRemovergetArchiveRemover()
TimeBasedFileNamingAndTriggeringPolicy