org.apache.directory.server.log
Interface LogScanner

All Known Implementing Classes:
DefaultLogScanner

public interface LogScanner


Method Summary
 void close()
          Closes the scanner and releases any resources.
 long getLastGoodFileNumber()
          Returns the last successfully read log file number
 long getLastGoodOffset()
          Returns the last successfully read log file number
 boolean getNextRecord(UserLogRecord logRecord)
          Reads and returns the next user record from the log into a backing byte array and returns a reference to it.
 

Method Detail

getNextRecord

boolean getNextRecord(UserLogRecord logRecord)
                      throws IOException,
                             InvalidLogException
Reads and returns the next user record from the log into a backing byte array and returns a reference to it. Returned array can be overwritten after the next call to getNextRecord()

Parameters:
log - record to be filled in by
Returns:
true if there is a next record throws IOException throws InvalidLogException thrown if the log content is invalid
Throws:
IOException
InvalidLogException

getLastGoodFileNumber

long getLastGoodFileNumber()
Returns the last successfully read log file number

Returns:
last successfully read log file number

getLastGoodOffset

long getLastGoodOffset()
Returns the last successfully read log file number

Returns:
last successfully read log file number

close

void close()
Closes the scanner and releases any resources.



Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.