com.sleepycat.je.log
Class UtilizationFileReader

java.lang.Object
  extended by com.sleepycat.je.log.FileReader
      extended by 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.


Field Summary
 
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 java.util.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(java.nio.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
 

Method Detail

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(java.nio.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 java.util.Map calcFileSummaryMap(EnvironmentImpl env)
                                        throws java.io.IOException,
                                               DatabaseException
Creates a UtilizationReader, reads the log, and returns the resulting Map of Long file number to FileSummary.

Throws:
java.io.IOException
DatabaseException


Copyright 2004,2008 Oracle. All rights reserved.