public class ConcurrentAuditReader extends AbstractAuditEventReader
counter, DEFAULT_AUDIT_EVENT_FACTORY_CLASS, eofReached, eventFactory, fileSize, inputFile, pending, reader| Constructor and Description |
|---|
ConcurrentAuditReader(File dataDir) |
ConcurrentAuditReader(File dataDir,
boolean tail)
This constructor creates a new concurrent audit-reader that
listens on the index file in the given data-directory.
|
ConcurrentAuditReader(File data,
File index) |
ConcurrentAuditReader(File dataDir,
File indexFile,
boolean tail)
This constructor creates a new concurrent audit-reader that reads from the
given index file and expects the audit data-files to exist relative to the
given data-directory.
|
ConcurrentAuditReader(InputStream index,
File dataDir) |
| Modifier and Type | Method and Description |
|---|---|
long |
bytesAvailable() |
long |
bytesRead() |
void |
close() |
void |
finish() |
Iterator<AuditEvent> |
iterator() |
AuditEvent |
readEvent(String s)
This method creates an audit-event instance from a file.
|
AuditEvent |
readNext()
This method read the next event from the file-system.
|
atEOF, getDataRead, getFileSize, getSectionIndex, hasNextpublic ConcurrentAuditReader(File dataDir, File indexFile, boolean tail) throws IOException
dataDir - The base directory of the data-files.indexFile - The file containing the summary-lines for all events.IOException - In case any of the files cannot be read or does not exist.public ConcurrentAuditReader(InputStream index, File dataDir) throws IOException
IOExceptionpublic ConcurrentAuditReader(File data, File index) throws IOException
IOExceptionpublic ConcurrentAuditReader(File dataDir, boolean tail) throws IOException
index and
has to exists in the given data-directory.dataDir - The directory where all audit-data is stored.Exception - In case the index file does not exists or
cannot be read.IOExceptionpublic ConcurrentAuditReader(File dataDir) throws IOException
IOExceptionpublic AuditEvent readNext() throws IOException, ParseException
readNext in interface AuditEventReaderreadNext in class AbstractAuditEventReaderNULL if no event is available.IOExceptionParseExceptionAuditEventReader.readNext()public AuditEvent readEvent(String s) throws IOException, ParseException
s and the basic
data directory that was specified at creation of this audit-reader.s - The index entry line.IOException - In case the file cannot be read (due to non-existence
or missing rights) an exception is thrown.ParseExceptionpublic void finish()
public void close()
throws IOException
close in interface AuditEventReaderclose in class AbstractAuditEventReaderIOExceptionAuditEventReader.close()public long bytesRead()
bytesRead in interface AuditEventReaderbytesRead in class AbstractAuditEventReaderAuditEventReader.bytesRead()public long bytesAvailable()
bytesAvailable in interface AuditEventReaderbytesAvailable in class AbstractAuditEventReaderAuditEventReader.bytesAvailable()public Iterator<AuditEvent> iterator()
Copyright © 2015 jwall.org. All Rights Reserved.