public class TimeBasedRollingPolicy extends Object implements RollingPolicy, Logging
RollingPolicy
by which files will be rolled
over at a fixed interval.Constructor and Description |
---|
TimeBasedRollingPolicy(long rolloverIntervalMillis,
String rollingFileSuffixPattern,
boolean checkIntervalConstraint) |
Modifier and Type | Method and Description |
---|---|
void |
bytesWritten(long bytes)
Notify that bytes have been written
|
String |
generateRolledOverFileSuffix()
Get the desired name of the rollover file
|
static long |
MINIMUM_INTERVAL_SECONDS() |
void |
rolledOver()
Rollover has occurred, so find the next time to rollover
|
long |
rolloverIntervalMillis() |
boolean |
shouldRollover(long bytesToBeWritten)
Should rollover if current time has exceeded next rollover time
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public TimeBasedRollingPolicy(long rolloverIntervalMillis, String rollingFileSuffixPattern, boolean checkIntervalConstraint)
public static long MINIMUM_INTERVAL_SECONDS()
public long rolloverIntervalMillis()
public boolean shouldRollover(long bytesToBeWritten)
shouldRollover
in interface RollingPolicy
public void rolledOver()
rolledOver
in interface RollingPolicy
public void bytesWritten(long bytes)
RollingPolicy
bytesWritten
in interface RollingPolicy
public String generateRolledOverFileSuffix()
RollingPolicy
generateRolledOverFileSuffix
in interface RollingPolicy