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.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sleepycat.je.log.FileReader
FileReader.EOFException, FileReader.ReadWindow
 
Field Summary
 
Fields inherited from class com.sleepycat.je.log.FileReader
cksumValidator, currentEntryHeader, currentEntryOffset, currentEntryPrevOffset, envImpl, eof, fileManager, forward, logger, nextEntryOffset, startLsn, window
 
Method Summary
static Map<Long,FileSummary> calcFileSummaryMap(EnvironmentImpl env)
          Creates a UtilizationReader, reads the log, and returns the resulting Map of Long file number to FileSummary.
protected  boolean isTargetEntry()
           
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
entryIsReplicated, getAndResetNReads, getLastEntrySize, getLastLsn, getNRepeatIteratorReads, getNumRead, initStartingPosition, makeWindow, readNextEntry, readNextEntryAllowExceptions, resyncReader, setAlwaysValidateChecksum, setBackwardPosition, setForwardPosition, threadSafeBufferFlip, threadSafeBufferPosition, 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()
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
Parameters:
entryBuffer - contains the entry data and is positioned at the data
Returns:
true if this entry should be returned
Throws:
DatabaseException

calcFileSummaryMap

public static Map<Long,FileSummary> calcFileSummaryMap(EnvironmentImpl env)
                                                throws DatabaseException
Creates a UtilizationReader, reads the log, and returns the resulting Map of Long file number to FileSummary.

Throws:
DatabaseException


Copyright (c) 2004-2010 Oracle. All rights reserved.