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, waitinitializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningpublic 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 RollingPolicypublic void rolledOver()
rolledOver in interface RollingPolicypublic void bytesWritten(long bytes)
bytesWritten in interface RollingPolicypublic String generateRolledOverFileSuffix()
generateRolledOverFileSuffix in interface RollingPolicy