com.sleepycat.je.tree
Class NameLN

java.lang.Object
  extended by com.sleepycat.je.tree.Node
      extended by com.sleepycat.je.tree.LN
          extended by com.sleepycat.je.tree.NameLN
All Implemented Interfaces:
Loggable

public final class NameLN
extends LN

A NameLN represents a Leaf Node in the name->database id mapping tree.


Constructor Summary
NameLN()
          Create an empty NameLN, to be filled in from the log.
NameLN(DatabaseId id)
          In the ideal world, we'd have a base LN class so that this NameLN doesn't have a superfluous data field, but we want to optimize the LN class for size and speed right now.
 
Method Summary
 java.lang.String beginTag()
           
protected  void dumpLogAdditional(java.lang.StringBuffer sb, boolean verbose)
          Dump additional fields.
 java.lang.String dumpString(int nSpaces, boolean dumpTags)
           
 java.lang.String endTag()
           
 DatabaseId getId()
           
 int getLogSize()
           
 LogEntryType getLogType()
           
protected  LogEntryType getTransactionalLogType()
          Log type for transactional entries.
 boolean isDeleted()
           
(package private)  void makeDeleted()
           
 void readFromLog(java.nio.ByteBuffer itemBuffer, byte entryTypeVersion)
          Initialize this object from the data in itemBuf.
 void setId(DatabaseId id)
           
 java.lang.String toString()
          Default toString method at the root of the tree.
 void writeToLog(java.nio.ByteBuffer logBuffer)
          Serialize this object into the buffer.
 
Methods inherited from class com.sleepycat.je.tree.LN
accountForSubtreeRemoval, canBeAncestor, canMemorySizeChangeDuringLogging, copyData, delete, dumpLog, getData, getLastLoggedSize, getMemorySizeIncludedByParent, isDirty, isEvictable, isEvictableInexact, isSoughtNode, isValidForDelete, log, logUpdateMemUsage, logUpdateMemUsage, modify, optionalLog, optionalLogProvisional, optionalLogUpdateMemUsage, rebuildINList, setDirty, setLastLoggedSize
 
Methods inherited from class com.sleepycat.je.tree.Node
containsDuplicates, dump, getLastId, getLevel, getNextNodeId, getNodeId, getTransactionId, getType, latchShared, matchLNByNodeId, postFetchInit, releaseLatch, 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.Loggable
getTransactionId
 

Constructor Detail

NameLN

public NameLN(DatabaseId id)
In the ideal world, we'd have a base LN class so that this NameLN doesn't have a superfluous data field, but we want to optimize the LN class for size and speed right now.


NameLN

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

Method Detail

isDeleted

public boolean isDeleted()
Overrides:
isDeleted in class LN

makeDeleted

void makeDeleted()
Overrides:
makeDeleted in class LN

getId

public DatabaseId getId()

setId

public void setId(DatabaseId id)

toString

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

Overrides:
toString in class Node

beginTag

public java.lang.String beginTag()
Overrides:
beginTag in class LN

endTag

public java.lang.String endTag()
Overrides:
endTag in class LN

dumpString

public java.lang.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()
Overrides:
getLogType in class LN
See Also:
Node.getLogType()

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(java.nio.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(java.nio.ByteBuffer itemBuffer,
                        byte entryTypeVersion)
                 throws LogException
Description copied from interface: Loggable
Initialize this object from the data in itemBuf.

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

dumpLogAdditional

protected void dumpLogAdditional(java.lang.StringBuffer sb,
                                 boolean verbose)
Dump additional fields. Done this way so the additional info can be within the XML tags defining the dumped log entry.

Overrides:
dumpLogAdditional in class LN


Copyright 2004,2008 Oracle. All rights reserved.