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.
| Modifier and Type | Class and Description |
|---|---|
static class |
LogFile.LogEntry
Class to manage LogEntry information
|
| Modifier and Type | Method and 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() |
protected BufferedReader |
getLogFileReader(long fromFilePosition)
This method opens the server.log file and moves the stream to
the specified filePosition.
|
public LogFile(String name)
public List getLogEntries(long startingRecord)
startingRecord - The starting point to search for LogEntriespublic List getLogEntries(long startingRecord, long maxRecords)
startingRecord - The starting point to search for LogEntriesmaxRecords - The maximum number of records to returnprotected BufferedReader getLogFileReader(long fromFilePosition)
public String getLogFileName()
public long getLastIndexNumber()
public long getIndexSize()
Copyright © 2017. All rights reserved.