com.sleepycat.je.tree
Class DupCountLN

java.lang.Object
  extended by com.sleepycat.je.tree.Node
      extended by com.sleepycat.je.tree.LN
          extended by com.sleepycat.je.tree.DupCountLN
All Implemented Interfaces:
LoggableObject, LogReadable, LogWritable

public final class DupCountLN
extends LN

A DupCountLN represents the transactional part of the root of a duplicate tree, specifically the count of dupes in the tree.


Constructor Summary
DupCountLN()
          Create an empty DupCountLN, to be filled in from the log.
DupCountLN(int count)
          Create a new DupCountLn to hold a new DIN.
 
Method Summary
 void accumulateStats(TreeWalkerStatsAccumulator acc)
           
 String beginTag()
           
 boolean containsDuplicates()
           
 int decDupCount()
           
protected  void dumpLogAdditional(StringBuffer sb)
          Dump additional fields
 String dumpString(int nSpaces, boolean dumpTags)
           
 String endTag()
           
 int getDupCount()
           
 int getLogSize()
           
 LogEntryType getLogType()
          All objects that are reponsible for a generating a type of log entry must implement this.
 long getMemorySizeIncludedByParent()
          Compute the approximate size of this node in memory for evictor invocation purposes.
protected  LogEntryType getTransactionalLogType()
          Log type for transactional entries.
 int incDupCount()
           
 boolean isDeleted()
           
 void readFromLog(ByteBuffer itemBuffer, byte entryTypeVersion)
          Initialize this object from the data in itemBuf.
(package private)  void setDupCount(int dupCount)
           
 String toString()
          Default toString method at the root of the tree.
 void writeToLog(ByteBuffer logBuffer)
          Serialize this object into the buffer.
 
Methods inherited from class com.sleepycat.je.tree.LN
accountForSubtreeRemoval, addToDirtyMap, canBeAncestor, copyData, countAsObsoleteWhenLogged, delete, dumpLog, getData, getTransactionId, isSoughtNode, isValidForDelete, log, logEntryIsTransactional, logProvisional, makeDeleted, modify, rebuildINList
 
Methods inherited from class com.sleepycat.je.tree.Node
dump, getLastId, getLevel, getNextNodeId, getNodeId, getType, marshallOutsideWriteLatch, matchLNByNodeId, postFetchInit, postLogWork, setLastNodeId, setNodeId, shortDescription, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sleepycat.je.log.LoggableObject
marshallOutsideWriteLatch, postLogWork
 

Constructor Detail

DupCountLN

public DupCountLN(int count)
Create a new DupCountLn to hold a new DIN.


DupCountLN

public DupCountLN()
Create an empty DupCountLN, to be filled in from the log.

Method Detail

getDupCount

public int getDupCount()

incDupCount

public int incDupCount()

decDupCount

public int decDupCount()

setDupCount

void setDupCount(int dupCount)

containsDuplicates

public boolean containsDuplicates()
Overrides:
containsDuplicates in class Node
Returns:
true if this node is a duplicate-bearing node type, false if otherwise.

isDeleted

public boolean isDeleted()
Overrides:
isDeleted in class LN

getMemorySizeIncludedByParent

public long getMemorySizeIncludedByParent()
Compute the approximate size of this node in memory for evictor invocation purposes.

Overrides:
getMemorySizeIncludedByParent in class LN

accumulateStats

public void accumulateStats(TreeWalkerStatsAccumulator acc)

toString

public String toString()
Description copied from class: Node
Default toString method at the root of the tree.

Overrides:
toString in class Node

beginTag

public String beginTag()
Overrides:
beginTag in class LN

endTag

public String endTag()
Overrides:
endTag in class LN

dumpString

public String dumpString(int nSpaces,
                         boolean dumpTags)
Overrides:
dumpString in class LN

getTransactionalLogType

protected LogEntryType getTransactionalLogType()
Log type for transactional entries.

Overrides:
getTransactionalLogType in class LN

getLogType

public LogEntryType getLogType()
Description copied from interface: LoggableObject
All objects that are reponsible for a generating a type of log entry must implement this.

Specified by:
getLogType in interface LoggableObject
Overrides:
getLogType in class LN
Returns:
the type of log entry
See Also:
LN.getLogType()

getLogSize

public int getLogSize()
Specified by:
getLogSize in interface LogWritable
Overrides:
getLogSize in class LN
Returns:
number of bytes used to store this object.
See Also:
LN.getLogSize()

writeToLog

public void writeToLog(ByteBuffer logBuffer)
Description copied from interface: LogWritable
Serialize this object into the buffer.

Specified by:
writeToLog in interface LogWritable
Overrides:
writeToLog in class LN
Parameters:
logBuffer - is the destination buffer
See Also:
LN.writeToLog(java.nio.ByteBuffer)

readFromLog

public void readFromLog(ByteBuffer itemBuffer,
                        byte entryTypeVersion)
                 throws LogException
Description copied from interface: LogReadable
Initialize this object from the data in itemBuf.

Specified by:
readFromLog in interface LogReadable
Overrides:
readFromLog in class LN
Throws:
LogException
See Also:
LN.readFromLog(java.nio.ByteBuffer, byte)

dumpLogAdditional

protected void dumpLogAdditional(StringBuffer sb)
Dump additional fields

Overrides:
dumpLogAdditional in class LN


Copyright 2004-2005 Sleepycat, Inc. All Rights Reserved.