|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface LogEntityReader
Defines the interface for log entity readers
| Method Summary | |
|---|---|
int |
readBinary(long startPos,
byte[] buffer)
Reads from a start position a given number of bytes from the log file. |
long |
readLogEvents(long startPos,
int maxEvents,
long maxProcessingTime,
LogEventFilter filter,
ArrayList eventList)
Parses the log entity for log events. |
long |
readLogEvents(long startPos,
int maxEvents,
long maxProcessingTime,
LogEventFilter filter,
ObjectOutputStream target)
|
long |
size()
Returns the size of the log entity in bytes |
| Method Detail |
|---|
long readLogEvents(long startPos,
int maxEvents,
long maxProcessingTime,
LogEventFilter filter,
ArrayList eventList)
throws IOException,
UnsupportedOperationException
events log events. If the start position is >0 the parser seeks
to next starting log event.
If the file position is a positive number the reading starts from the given file position. If the given file position is a negative number it is used as offset from the end of the file.
Be prepared that the requested number of events can be limited.
The parser returns if either the end of the file is reached, the max number of events is parsed or the max processing time is exceeded.
startPos - The start position where the parsing startsmaxEvents - The max number of events to be processedmaxProcessingTime - The max processing time in milliseconds.
A value of 0 means no time limit.filter - A log event filtereventList - The event list to be filled with the parsed
IOException - Thrown if file does not exist or cannot be read
UnsupportedOperationException - if readig log events is not supported
on the currently used log entity
long readLogEvents(long startPos,
int maxEvents,
long maxProcessingTime,
LogEventFilter filter,
ObjectOutputStream target)
throws IOException,
UnsupportedOperationException
IOException
UnsupportedOperationException
int readBinary(long startPos,
byte[] buffer)
throws IOException,
UnsupportedOperationException
Note that not all log entities may support binary reading.
startPos - The start position where the parsing startsbuffer - The allocated buffer to receive the file data
IOException - Thrown if file does not exist or cannot be read
UnsupportedOperationException - if binary read is not supported
on the currently used log entity
long size()
throws IOException,
UnsupportedOperationException
IOException - Thrown if file does not exist or cannot be read
UnsupportedOperationException - if the entity size is not
supported on the currently used log entity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||