Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 3.2.76
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sleepycat.je
Class LogScanner

    java.lang.Object
      com.sleepycat.je.LogScanner

    public class LogScanner

extends Object

Used with Environment.scanLog to scan raw log entries. An instance of a class that implements this interface should be passed to Environment.scanLog.

WARNING: This interface is meant for low level processing of log records, not for application level queries. See the following restrictions!

Please be aware that raw log entries are passed to the scanRecord method. It is the responsibility of the caller to ensure that these records represent valid records in a Database by performing queries such as Database.get. Be sure to take into account the following information about records that are passed to the scanRecord method:

- Records may be part of transactions that were aborted or never committed, as well as part of committed transactions or not part of any transaction (written non-transactionally).
- Records may be part of the interval specified when calling scanLog because they were written by the log cleaner as it migrates records forward, and not written by the application itself in the specified interval.
- For a given record, there may be multiple versions of the record passed to scanRecord because multiple versions of that record were written to the log.
- For a given record, a deleted version of the record may appear before or after a non-deleted version of the record.
- The cleaner must be disabled while this method is running.
- This method should only be invoked immediately after recovery and prior to any updates to the Environment.

Constructor Summary
`LogScanner()`

Method Summary
`boolean` | `scanRecord(DatabaseEntry key, DatabaseEntry data, boolean deleted, String databaseName)` Called for each record scanned.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LogScanner

    public LogScanner()

Method Detail

### scanRecord

    public boolean scanRecord(DatabaseEntry key,
                              DatabaseEntry data,
                              boolean deleted,
                              String databaseName)

  Called for each record scanned.

  Parameters:
    `key` - is the key entry of the record scanned. This parameter will not be null.
    `data` - is the data entry of the record scanned. This parameter may be null for deleted records.
    `deleted` - is true if the given record is deleted at this point in the log. Note that it may also appear earlier or later in the log.
    `databaseName` - the name of the database in which the record appears. Note that if the database was renamed, this is the last known name of the database at the time scanLog is called.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 3.2.76
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1996,2008 Oracle. All rights reserved.