com.sleepycat.je.cleaner
Class PackedObsoleteInfo

java.lang.Object
  extended by java.io.OutputStream
      extended by com.sleepycat.util.FastOutputStream
          extended by com.sleepycat.bind.tuple.TupleOutput
              extended by com.sleepycat.je.cleaner.PackedObsoleteInfo
All Implemented Interfaces:
Closeable, Flushable

public class PackedObsoleteInfo
extends TupleOutput

A sequence of obsolete info. To save memory, a TupleOutput is used to contain a sequence of {LSN-file, LSN-offset, isLN, size} tuples. Packed integers are used and memory is saved by not using an Object for each tuple, as would be needed in a Java collection. An OffsetList was not used because it does not use packed integers. PackedOffsets was not used because it depends on offsets being sorted in ascending order.


Field Summary
 
Fields inherited from class com.sleepycat.util.FastOutputStream
DEFAULT_BUMP_SIZE, DEFAULT_INIT_SIZE
 
Constructor Summary
PackedObsoleteInfo()
           
 
Method Summary
 void addObsoleteInfo(long obsoleteLsn, boolean isObsoleteLN, int obsoleteSize)
           
 void copyObsoleteInfo(PackedObsoleteInfo other)
           
 void countObsoleteInfo(UtilizationTracker tracker, DatabaseImpl nodeDb)
           
 int getMemorySize()
           
 
Methods inherited from class com.sleepycat.bind.tuple.TupleOutput
getBigIntegerByteLength, writeBigInteger, writeBoolean, writeByte, writeBytes, writeBytes, writeChar, writeChars, writeChars, writeDouble, writeFloat, writeInt, writeLong, writePackedInt, writePackedLong, writeShort, writeSortedDouble, writeSortedFloat, writeString, writeString, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort
 
Methods inherited from class com.sleepycat.util.FastOutputStream
addSize, getBufferBytes, getBufferLength, getBufferOffset, makeSpace, reset, size, toByteArray, toString, toString, write, write, write, writeFast, writeFast, writeFast, writeTo
 
Methods inherited from class java.io.OutputStream
close, flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PackedObsoleteInfo

public PackedObsoleteInfo()
Method Detail

getMemorySize

public int getMemorySize()

copyObsoleteInfo

public void copyObsoleteInfo(PackedObsoleteInfo other)

addObsoleteInfo

public void addObsoleteInfo(long obsoleteLsn,
                            boolean isObsoleteLN,
                            int obsoleteSize)

countObsoleteInfo

public void countObsoleteInfo(UtilizationTracker tracker,
                              DatabaseImpl nodeDb)


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