public interface LogStreamReader extends Iterator<LoggedEvent>, CloseableSilently
reader.wrap(log);
// optionally seek to a position
reader.seek(position);
while(reader.hasNext())
{
final LoggedEvent event = reader.next();
// process the event..
}
| Modifier and Type | Method and Description |
|---|---|
long |
getPosition()
Returns the current log position of the reader.
|
boolean |
isClosed()
Returns true if the log stream reader was closed.
|
boolean |
seek(long position)
Seek to the given log position if exists.
|
void |
seekToFirstEvent()
Seek to the log position of the first event.
|
void |
seekToLastEvent()
Seek to the log position of the last event.
|
void |
wrap(LogStream log)
Initialize the reader and seek to the first event.
|
void |
wrap(LogStream log,
long position)
Initialize the reader and seek to the given log position.
|
forEachRemaining, hasNext, next, removeclosevoid wrap(LogStream log)
log - the stream which provides the logvoid wrap(LogStream log, long position)
log - the stream which provides the logposition - the position in the log to seek toboolean seek(long position)
position - the position in the log to seek totrue, if the given position exists.void seekToFirstEvent()
void seekToLastEvent()
long getPosition()
boolean isClosed()
Copyright © 2017–2018 camunda services GmbH. All rights reserved.