com.sleepycat.je.tree
Class MapLN

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

public final class MapLN
extends LN

A MapLN represents a Leaf Node in the JE DatabaseImpl Naming Tree.


Constructor Summary
MapLN()
          Create an empty MapLN, to be filled in from the log.
MapLN(DatabaseImpl db)
          Create a new MapLn to hold a new databaseImpl.
 
Method Summary
 String beginTag()
           
protected  void dumpLogAdditional(StringBuffer sb)
          Dump additional fields.
 String dumpString(int nSpaces, boolean dumpTags)
           
 String endTag()
           
 DatabaseImpl getDatabase()
           
 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 postFetchInit(DatabaseImpl db, long sourceLsn)
          Initialize a node that has been faulted in from the log.
 void readFromLog(ByteBuffer itemBuffer, byte entryTypeVersion)
          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
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, 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

MapLN

public MapLN(DatabaseImpl db)
Create a new MapLn to hold a new databaseImpl. In the ideal world, we'd have a base LN class so that this MapLN doesn't have a superfluous data field, but we want to optimize the LN class for size and speed right now.


MapLN

public MapLN()
      throws DatabaseException
Create an empty MapLN, to be filled in from the log.

Throws:
DatabaseException
Method Detail

isDeleted

public boolean isDeleted()
Overrides:
isDeleted in class LN

makeDeleted

void makeDeleted()
Overrides:
makeDeleted in class LN

getDatabase

public DatabaseImpl getDatabase()

postFetchInit

public void postFetchInit(DatabaseImpl db,
                          long sourceLsn)
                   throws DatabaseException
Initialize a node that has been faulted in from the log.

Overrides:
postFetchInit in class Node
Throws:
DatabaseException

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.