Class RotatingLogFile
- java.lang.Object
-
- org.apache.jackrabbit.core.journal.RotatingLogFile
-
- All Implemented Interfaces:
Comparable<RotatingLogFile>
public class RotatingLogFile extends Object implements Comparable<RotatingLogFile>
Represents a log file that can be rotated.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(RotatingLogFile o)
Compares this log file to another file.File
getFile()
Return the backing file.static RotatingLogFile[]
listFiles(File directory, String basename)
List all log files inside some directory.void
rotate()
Rotate this file.
-
-
-
Method Detail
-
getFile
public File getFile()
Return the backing file.
-
rotate
public void rotate()
Rotate this file.
-
compareTo
public int compareTo(RotatingLogFile o)
Compares this log file to another file. It will return a negative number if this log file has a smaller version, a positive number if this log file a bigger version and0
if they have the same version.- Specified by:
compareTo
in interfaceComparable<RotatingLogFile>
-
listFiles
public static RotatingLogFile[] listFiles(File directory, String basename)
List all log files inside some directory. The list returned is guaranteed to be in descending order, i.e. it is safe to rotate every file in turn without accidentally overwriting another one.- Parameters:
directory
- parent directorybasename
- basename expected- Returns:
- array of log files found
-
-