Class LogFile
- java.lang.Object
-
- com.sun.enterprise.server.logging.logviewer.backend.LogFile
-
- All Implemented Interfaces:
Serializable
public class LogFile extends Object implements Serializable
This class encapsulates the log file so that its details are not exposed. "getLongEntries" returns an unfiltered List of LogEntry objects from the requested record number. It will always search forward. getIndexSize() returns the number of records between each index. getLastIndexNumber returns the last index.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LogFile.LogEntry
Class to manage LogEntry information
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getIndexSize()
long
getLastIndexNumber()
The log records are indexed, this method returns the last index.List
getLogEntries(long startingRecord)
This method returns up to _indexSize records starting with the given record number.List
getLogEntries(long startingRecord, long maxRecords)
This method returns up to _indexSize records starting with the given record number.String
getLogFileName()
-
-
-
Constructor Detail
-
LogFile
public LogFile(String name)
Constructor
-
-
Method Detail
-
getLogEntries
public List getLogEntries(long startingRecord)
This method returns up to _indexSize records starting with the given record number.- Parameters:
startingRecord
- The starting point to search for LogEntries
-
getLogEntries
public List getLogEntries(long startingRecord, long maxRecords)
This method returns up to _indexSize records starting with the given record number. It will return up to "maxRecords" records.- Parameters:
startingRecord
- The starting point to search for LogEntriesmaxRecords
- The maximum number of records to return
-
getLogFileName
public String getLogFileName()
-
getLastIndexNumber
public long getLastIndexNumber()
The log records are indexed, this method returns the last index. It will ensure that the indexes are up-to-date.
-
getIndexSize
public long getIndexSize()
-
-