com.sleepycat.je.tree.dupConvert
Class DIN

java.lang.Object
  extended by com.sleepycat.je.tree.Node
      extended by com.sleepycat.je.tree.IN
          extended by com.sleepycat.je.tree.dupConvert.DIN
All Implemented Interfaces:
Loggable, Comparable<IN>

public final class DIN
extends IN

An DIN represents an Duplicate Internal Node in the JE tree. Obsolete in log version 8, only used by DupConvert and some log readers.


Field Summary
 
Fields inherited from class com.sleepycat.je.tree.IN
ACCUMULATED_LIMIT, BIN_LEVEL, DBMAP_LEVEL, EXACT_MATCH, INSERT_SUCCESS, latch, LEVEL_MASK, MAIN_LEVEL, MAX_LEVEL, MAY_EVICT_LNS, MAY_EVICT_NODE, MAY_NOT_EVICT, MIN_LEVEL
 
Fields inherited from class com.sleepycat.je.tree.Node
NULL_NODE_ID
 
Constructor Summary
DIN()
          Create an empty DIN, with no node ID, to be filled in from the log.
DIN(SizeofMarker marker)
          For Sizeof, set all array fields to null, since they are not part of the fixed overhead.
 
Method Summary
 String beginTag()
           
 long computeMemorySize()
          Count up the memory usage attributable to this node alone.
 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)
          DINS need to dump their dup key
 String dumpString(int nSpaces, boolean dumpTags)
          For unit test support:
 String endTag()
           
 DupCountLN getDupCountLN()
           
 ChildReference getDupCountLNRef()
           
protected  long getFixedMemoryOverhead()
           
 int getLogSize()
           
 LogEntryType getLogType()
          Get the log type of this node.
protected  boolean isEvictionProhibited()
          Returns whether the node is not evictable, irrespective of the status of the children nodes.
protected  long printMemorySize()
           
 void readFromLog(ByteBuffer itemBuffer, int entryVersion)
          Initialize this object from the data in itemBuf.
 String shortClassName()
           
 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.IN
afterLog, beforeLog, clearLsnCompaction, clearPendingDeleted, compactMemory, compareTo, createNewInstance, deleteEntry, dumpLog, equals, fetchTarget, fetchTargetWithExclusiveLatch, findEntry, findEntry, getBudgetedMemorySize, getCompactMaxKeyLength, getDatabase, getDatabaseId, getDirty, getEvictionType, getGeneration, getGenericLogType, getIdentifierKey, getInListResident, getInMemorySize, getKey, getKeyComparator, getKeyVals, getLastDeltaVersion, getLastFullVersion, getLastLoggedVersion, getLatchQueueLength, getLatchString, getLevel, getLsn, getMaxEntries, getMigrate, getNEntries, getNodeId, getRecalcToggle, getState, getTarget, getTargets, getTreeAdminMemorySize, hashCode, incEvictStats, incFetchStats, init, initMemorySize, insertEntry, insertEntry1, isDbRoot, isEntryKnownDeleted, isEntryPendingDeleted, isEvictable, isIN, isKeyInBounds, isLatchOwnerForRead, isLatchOwnerForWrite, isRoot, latch, latch, latchNoWait, latchNoWait, latchShared, latchShared, log, log, log, logDirtyChildren, logicalEquals, needsSplitting, optionalLog, optionalLogProvisional, postFetchInit, postRecoveryInit, prepareForSlotReuse, recalcKeyPrefix, releaseLatch, releaseLatchIfOwner, resetAndGetMemorySize, setDatabase, setDirty, setGeneration, setGeneration, setIdentifierKey, setInListResident, setMigrate, setPendingDeleted, setProhibitNextDelta, setRecalcToggle, splitInternal, updateEntry, updateEntry, updateEntry, updateMemorySize, updateNode, updateNode, updateNode, verify, verifyMemorySize
 
Methods inherited from class com.sleepycat.je.tree.Node
dump, getMemorySizeIncludedByParent, getTransactionId, getType, isBIN, isCompressible, isLN
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sleepycat.je.log.Loggable
getTransactionId
 

Constructor Detail

DIN

public DIN()
Create an empty DIN, with no node ID, to be filled in from the log.


DIN

public DIN(SizeofMarker marker)
For Sizeof, set all array fields to null, since they are not part of the fixed overhead.

Method Detail

getDupCountLNRef

public ChildReference getDupCountLNRef()

getDupCountLN

public DupCountLN getDupCountLN()
                         throws DatabaseException
Throws:
DatabaseException

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.

computeMemorySize

public long computeMemorySize()
Count up the memory usage attributable to this node alone. LNs children are counted by their BIN/DIN parents, but INs are not counted by their parents because they are resident on the IN list.

Overrides:
computeMemorySize in class IN

printMemorySize

protected long printMemorySize()
Overrides:
printMemorySize in class IN

getFixedMemoryOverhead

protected long getFixedMemoryOverhead()
Overrides:
getFixedMemoryOverhead in class IN

isEvictionProhibited

protected boolean isEvictionProhibited()
Description copied from class: IN
Returns whether the node is not evictable, irrespective of the status of the children nodes. Note that the IN may or may not be latched when this method is called. Returning the wrong answer is OK in that case (it will be called again later when latched), but an exception should not occur.

Overrides:
isEvictionProhibited in class IN

getLogType

public LogEntryType getLogType()
Description copied from class: IN
Get the log type of this node.

Overrides:
getLogType in class IN
See Also:
IN.getLogType()

getLogSize

public int getLogSize()
Specified by:
getLogSize in interface Loggable
Overrides:
getLogSize in class IN
Returns:
number of bytes used to store this object.
See Also:
IN.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 IN
Parameters:
logBuffer - is the destination buffer
See Also:
IN.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 IN
See Also:
IN.readFromLog(java.nio.ByteBuffer, int)

dumpLogAdditional

protected void dumpLogAdditional(StringBuilder sb)
DINS need to dump their dup key

Overrides:
dumpLogAdditional in class IN

beginTag

public String beginTag()
Overrides:
beginTag in class IN

endTag

public String endTag()
Overrides:
endTag in class IN

dumpString

public String dumpString(int nSpaces,
                         boolean dumpTags)
For unit test support:

Overrides:
dumpString in class IN
Returns:
a string that dumps information about this DIN, without

toString

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

Overrides:
toString in class IN

shortClassName

public String shortClassName()
Overrides:
shortClassName in class IN


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