| Modifier and Type | Field and Description |
|---|---|
| private File | |
| private DecimalFormat | |
| private int | |
| private int | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public | RevolvingFileStrategy(final File
the base file baseFile, final int the maximum number of rotations ?? maxRotations)Creation of a new instane ofthe revolving file strategy. |
| public | RevolvingFileStrategy(final File
the base file baseFile, final int the number of initial rotations ?? initialRotation, final int the maximum number of rotations?? maxRotations)Creation of a new instane ofthe revolving file strategy. |
| Modifier and Type | Method and Description |
|---|---|
| private int | Returns: the initial rotationMethod that searches through files that match the pattern for resolving file and determine the last generation written to. |
| private int | Returns: the rotation of the filethe file to check file)Return the rotation for the specified file |
| private int[] | Returns: the array containing rotationsthe files to generate rotation numbers for matchingFiles)Generate an array of rotation numbers for all the files specified. |
| public int | |
| private File[] | Returns: the list of files that matchGet a list of files that could have been part of the rotation. |
| public File | Returns: File the calculated file nameImplements org. |
| m_baseFile | back to summary |
|---|---|
| private File m_baseFile | |
| m_decimalFormat | back to summary |
|---|---|
| private DecimalFormat m_decimalFormat | |
| m_maxRotations | back to summary |
|---|---|
| private int m_maxRotations | |
| m_rotation | back to summary |
|---|---|
| private int m_rotation | |
| PATTERN | back to summary |
|---|---|
| private static final String PATTERN | |
| RevolvingFileStrategy | back to summary |
|---|---|
| public RevolvingFileStrategy(final File baseFile, final int maxRotations) Creation of a new instane ofthe revolving file strategy.
| |
| RevolvingFileStrategy | back to summary |
|---|---|
| public RevolvingFileStrategy(final File baseFile, final int initialRotation, final int maxRotations) Creation of a new instane ofthe revolving file strategy.
| |
| calculateInitialRotation | back to summary |
|---|---|
| private int calculateInitialRotation() Method that searches through files that match the pattern for resolving file and determine the last generation written to.
| |
| calculateRotationForFile | back to summary |
|---|---|
| private int calculateRotationForFile(final File file) Return the rotation for the specified file
| |
| calculateRotations | back to summary |
|---|---|
| private int[] calculateRotations(final File[] matchingFiles) Generate an array of rotation numbers for all the files specified.
| |
| getCurrentRotation | back to summary |
|---|---|
| public int getCurrentRotation() Retrieve the current rotation number.
| |
| getMatchingFiles | back to summary |
|---|---|
| private File[] getMatchingFiles() Get a list of files that could have been part of the rotation.
| |
| nextFile | back to summary |
|---|---|
| public File nextFile() Implements org. Calculate the real file name from the base filename.
| |