org.apache.log.output.io.rotate
public class RevolvingFileStrategy extends Object implements FileStrategy
Field Summary | |
---|---|
File | m_baseFile |
DecimalFormat | m_decimalFormat |
int | m_maxRotations |
int | m_rotation |
static String | PATTERN |
Constructor Summary | |
---|---|
RevolvingFileStrategy(File baseFile, int maxRotations)
Creation of a new instane ofthe revolving file strategy. | |
RevolvingFileStrategy(File baseFile, int initialRotation, int maxRotations)
Creation of a new instane ofthe revolving file strategy. |
Method Summary | |
---|---|
int | calculateInitialRotation()
Method that searches through files that
match the pattern for resolving file and determine
the last generation written to.
|
int | calculateRotationForFile(File file)
Return the rotation for the specified file
|
int[] | calculateRotations(File[] matchingFiles)
Generate an array of rotation numbers for all the files specified.
|
int | getCurrentRotation()
Retrieve the current rotation number.
|
File[] | getMatchingFiles()
Get a list of files that could have been part of the rotation.
|
File | nextFile()
Calculate the real file name from the base filename.
|
Parameters: baseFile the base file maxRotations the maximum number of rotations ??
Parameters: baseFile the base file initialRotation the number of initial rotations ?? maxRotations the maximum number of rotations??
Returns: the initial rotation
Parameters: file the file to check
Returns: the rotation of the file
Parameters: matchingFiles the files to generate rotation numbers for
Returns: the array containing rotations
Returns: the current rotation number.
Returns: the list of files that match
Returns: File the calculated file name