com.sleepycat.je.log
Class UtilizationFileReader
java.lang.Object
com.sleepycat.je.log.FileReader
com.sleepycat.je.log.UtilizationFileReader
public class UtilizationFileReader
- extends FileReader
Summarizes the utilized and unutilized portion of each log file by examining
each log entry. Does not use the Cleaner UtilizationProfile information in
order to provide a second measure against which to evaluation the
UtilizationProfile accuracy.
Fields inherited from class com.sleepycat.je.log.FileReader |
anticipateChecksumErrors, cksumValidator, currentEntryHeader, currentEntryOffset, currentEntryPrevOffset, envImpl, eof, fileManager, nextEntryOffset, readBufferFileEnd, readBufferFileNum, readBufferFileStart, startLsn |
Method Summary |
static Map |
calcFileSummaryMap(EnvironmentImpl env)
Creates a UtilizationReader, reads the log, and returns the resulting
Map of Long file number to FileSummary. |
protected boolean |
isTargetEntry(byte logEntryTypeNumber,
byte logEntryTypeVersion)
|
protected boolean |
processEntry(ByteBuffer entryBuffer)
Each file reader implements this method to process the entry data. |
Methods inherited from class com.sleepycat.je.log.FileReader |
getAndResetNReads, getLastEntrySize, getLastLsn, getNRepeatIteratorReads, getNumRead, initStartingPosition, readEntry, readNextEntry, resyncReader, setAlwaysValidateChecksum, threadSafeBufferPosition |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isTargetEntry
protected boolean isTargetEntry(byte logEntryTypeNumber,
byte logEntryTypeVersion)
- Overrides:
isTargetEntry
in class FileReader
- Returns:
- true if this reader should process this entry, or just
skip over it.
processEntry
protected boolean processEntry(ByteBuffer entryBuffer)
throws DatabaseException
- Description copied from class:
FileReader
- Each file reader implements this method to process the entry data.
- Specified by:
processEntry
in class FileReader
- Returns:
- true if this entry should be returned
- Throws:
DatabaseException
calcFileSummaryMap
public static Map calcFileSummaryMap(EnvironmentImpl env)
throws IOException,
DatabaseException
- Creates a UtilizationReader, reads the log, and returns the resulting
Map of Long file number to FileSummary.
- Throws:
IOException
DatabaseException
Copyright 2004,2008 Oracle. All rights reserved.