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:
LoggableObject, LogReadable, LogWritable

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
 String beginTag()
           
protected  void dumpLogAdditional(StringBuffer sb)
          Dump additional fields.
 String dumpString(int nSpaces, boolean dumpTags)
           
 String endTag()
           
 DatabaseId getId()
           
 int getLogSize()
           
 LogEntryType getLogType()
          All objects that are reponsible for a generating a type of log entry must implement this.
protected  LogEntryType getTransactionalLogType()
          Log type for transactional entries.
 boolean isDeleted()
           
(package private)  void makeDeleted()
           
 void readFromLog(ByteBuffer itemBuffer, byte entryTypeVersion)
          Initialize this object from the data in itemBuf.
 void setId(DatabaseId id)
           
 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, getMemorySizeIncludedByParent, getTransactionId, isSoughtNode, isValidForDelete, log, logEntryIsTransactional, logProvisional, modify, rebuildINList
 
Methods inherited from class com.sleepycat.je.tree.Node
containsDuplicates, 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

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 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. 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-2005 Sleepycat, Inc. All Rights Reserved.