public abstract class TimeBasedFileNamingAndTriggeringPolicyBase<E> extends ContextAwareBase implements TimeBasedFileNamingAndTriggeringPolicy<E>
Modifier and Type | Field and Description |
---|---|
protected ArchiveRemover |
archiveRemover |
protected long |
artificialCurrentTime |
protected Date |
dateInCurrentPeriod |
protected String |
elapsedPeriodsFileName |
protected boolean |
errorFree |
protected long |
nextCheck |
protected RollingCalendar |
rc |
protected boolean |
started |
protected TimeBasedRollingPolicy<E> |
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.
|
protected boolean |
isErrorFree() |
boolean |
isStarted() |
void |
setCurrentTime(long timeInMillis)
Set the current time.
|
void |
setDateInCurrentPeriod(Date _dateInCurrentPeriod) |
protected void |
setDateInCurrentPeriod(long now) |
void |
setTimeBasedRollingPolicy(TimeBasedRollingPolicy<E> _tbrp)
Set the host/parent
TimeBasedRollingPolicy . |
void |
start() |
void |
stop() |
protected void |
withErrors() |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isTriggeringEvent
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
protected TimeBasedRollingPolicy<E> tbrp
protected ArchiveRemover archiveRemover
protected String elapsedPeriodsFileName
protected RollingCalendar rc
protected long artificialCurrentTime
protected Date dateInCurrentPeriod
protected long nextCheck
protected boolean started
protected boolean errorFree
public TimeBasedFileNamingAndTriggeringPolicyBase()
protected void computeNextCheck()
protected void setDateInCurrentPeriod(long now)
public void setDateInCurrentPeriod(Date _dateInCurrentPeriod)
public String getElapsedPeriodsFileName()
TimeBasedFileNamingAndTriggeringPolicy
getElapsedPeriodsFileName
in interface TimeBasedFileNamingAndTriggeringPolicy<E>
public String getCurrentPeriodsFileNameWithoutCompressionSuffix()
TimeBasedFileNamingAndTriggeringPolicy
getCurrentPeriodsFileNameWithoutCompressionSuffix
in interface TimeBasedFileNamingAndTriggeringPolicy<E>
public void setCurrentTime(long timeInMillis)
TimeBasedFileNamingAndTriggeringPolicy
setCurrentTime
in interface TimeBasedFileNamingAndTriggeringPolicy<E>
public long getCurrentTime()
TimeBasedFileNamingAndTriggeringPolicy
getCurrentTime
in interface TimeBasedFileNamingAndTriggeringPolicy<E>
public void setTimeBasedRollingPolicy(TimeBasedRollingPolicy<E> _tbrp)
TimeBasedFileNamingAndTriggeringPolicy
TimeBasedRollingPolicy
.setTimeBasedRollingPolicy
in interface TimeBasedFileNamingAndTriggeringPolicy<E>
_tbrp
- parent TimeBasedRollingPolicypublic ArchiveRemover getArchiveRemover()
TimeBasedFileNamingAndTriggeringPolicy
getArchiveRemover
in interface TimeBasedFileNamingAndTriggeringPolicy<E>
protected void withErrors()
protected boolean isErrorFree()
Copyright © 2005–2021 QOS.ch. All rights reserved.