public class SizeBasedRollingPolicy extends Object implements RollingPolicy, Logging
RollingPolicy
by which files will be rolled
over after reaching a particular size.Constructor and Description |
---|
SizeBasedRollingPolicy(long rolloverSizeBytes,
boolean checkSizeConstraint) |
Modifier and Type | Method and Description |
---|---|
void |
bytesWritten(long bytes)
Increment the bytes that have been written in the current file
|
java.text.SimpleDateFormat |
formatter() |
String |
generateRolledOverFileSuffix()
Get the desired name of the rollover file
|
static int |
MINIMUM_SIZE_BYTES() |
void |
rolledOver()
Rollover has occurred, so reset the counter
|
long |
rolloverSizeBytes() |
boolean |
shouldRollover(long bytesToBeWritten)
Should rollover if the next set of bytes is going to exceed the size limit
|
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 SizeBasedRollingPolicy(long rolloverSizeBytes, boolean checkSizeConstraint)
public static int MINIMUM_SIZE_BYTES()
public long rolloverSizeBytes()
public java.text.SimpleDateFormat formatter()
public boolean shouldRollover(long bytesToBeWritten)
shouldRollover
in interface RollingPolicy
public void rolledOver()
rolledOver
in interface RollingPolicy
public void bytesWritten(long bytes)
bytesWritten
in interface RollingPolicy
public String generateRolledOverFileSuffix()
generateRolledOverFileSuffix
in interface RollingPolicy