com.sleepycat.je.tree.dupConvert
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.dupConvert.DupCountLN
All Implemented Interfaces:
Loggable

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. Obsolete in log version 8, only used by DupConvert and some log readers.


Field Summary
 
Fields inherited from class com.sleepycat.je.tree.Node
NULL_NODE_ID
 
Constructor Summary
DupCountLN()
          Create an empty DupCountLN, to be filled in from the log.
 
Method Summary
 String beginTag()
           
 boolean containsDuplicates()
          Since DIN/DBIN/DupCountLN are no longer used in the Btree, this method should normally only be used by dup conversion or entities that do not access records via the Btree.
protected  void dumpLogAdditional(StringBuilder sb, boolean verbose)
          Dump additional fields
 String dumpString(int nSpaces, boolean dumpTags)
           
 String endTag()
           
 int getDupCount()
           
 int getLogSize()
           
protected  LogEntryType getLogType(boolean isInsert, boolean isTransactional)
          Return the correct log entry type for a DupCountLN depends on whether it's transactional.
 long getMemorySizeIncludedByParent()
          Compute the approximate size of this node in memory for evictor invocation purposes.
 boolean isDeleted()
           
 boolean logicalEquals(Loggable other)
           
 void readFromLog(ByteBuffer itemBuffer, int entryVersion)
          Initialize this object from the data in itemBuf.
 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
addExtraMarshaledMemorySize, copyEntryData, delete, dumpKey, dumpLog, getData, getGenericLogType, getLastLoggedSize, getVLSNSequence, incFetchStats, isDirty, isLN, log, log, makeLN, makeLN, modify, optionalLog, optionalLogProvisional, releaseMemoryBudget, resolvePartialEntry, setDirty, setEmpty, setEntry, setEntry, setLastLoggedSize, setVLSNSequence
 
Methods inherited from class com.sleepycat.je.tree.Node
dump, getLevel, getTransactionId, getType, isBIN, isCompressible, isIN, latchShared, latchShared, postFetchInit, releaseLatch, 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.Loggable
getTransactionId
 

Constructor Detail

DupCountLN

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

Method Detail

getDupCount

public int getDupCount()

containsDuplicates

public boolean containsDuplicates()
Description copied from class: Node
Since DIN/DBIN/DupCountLN are no longer used in the Btree, this method should normally only be used by dup conversion or entities that do not access records via the Btree.

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

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

getLogType

protected LogEntryType getLogType(boolean isInsert,
                                  boolean isTransactional)
Return the correct log entry type for a DupCountLN depends on whether it's transactional.

Overrides:
getLogType in class LN

getLogSize

public int getLogSize()
Specified by:
getLogSize in interface Loggable
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: Loggable
Serialize this object into the buffer.

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

readFromLog

public void readFromLog(ByteBuffer itemBuffer,
                        int entryVersion)
Description copied from interface: Loggable
Initialize this object from the data in itemBuf.

Specified by:
readFromLog in interface Loggable
Overrides:
readFromLog in class LN
See Also:
LN.readFromLog(java.nio.ByteBuffer, int)

logicalEquals

public boolean logicalEquals(Loggable other)
Specified by:
logicalEquals in interface Loggable
Overrides:
logicalEquals in class LN
Returns:
true if these two loggable items are logically the same. Used for replication testing.
See Also:
DupCountLNs are never replicated.

dumpLogAdditional

protected void dumpLogAdditional(StringBuilder sb,
                                 boolean verbose)
Dump additional fields

Overrides:
dumpLogAdditional in class LN


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