|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.tree.Node
public abstract class Node
A Node contains all the common base information for any JE B-Tree node.
Constructor Summary | |
---|---|
protected |
Node(boolean init)
Create a new node, assigning it the next available node id. |
Method Summary | |
---|---|
(package private) abstract void |
accountForSubtreeRemoval(INList inList,
UtilizationTracker tracker)
Remove yourself from the in memory list if you're a type of node that is put there. |
protected abstract boolean |
canBeAncestor(boolean targetContainsDuplicates)
|
boolean |
containsDuplicates()
|
boolean |
countAsObsoleteWhenLogged()
Returns true if this item should be counted as obsoleted when logged. |
void |
dump(int nSpaces)
|
void |
dumpLog(StringBuffer sb,
boolean verbose)
Write the object into the string buffer for log dumping. |
(package private) String |
dumpString(int nSpaces,
boolean dumpTags)
|
static long |
getLastId()
Get the latest id, for checkpointing. |
(package private) int |
getLevel()
Cover for LN's and just return 0 since they'll always be at the bottom of the tree. |
int |
getLogSize()
|
abstract LogEntryType |
getLogType()
All objects that are reponsible for a generating a type of log entry must implement this. |
protected long |
getMemorySizeIncludedByParent()
Return the approximate size of this node in memory, if this size should be included in it's parents memory accounting. |
static long |
getNextNodeId()
Increment and return the next usable id. |
long |
getNodeId()
|
String |
getType()
|
protected abstract boolean |
isSoughtNode(long nid,
boolean updateGeneration)
|
(package private) abstract boolean |
isValidForDelete()
|
boolean |
marshallOutsideWriteLatch()
Return true if this item can be marshalled outside the log write latch. |
(package private) boolean |
matchLNByNodeId(TreeLocation location,
long nodeId)
|
void |
postFetchInit(DatabaseImpl db,
long sourceLsn)
Initialize a node that has been faulted in from the log |
void |
postLogWork(long justLoggedLsn)
Do any processing we need to do after logging, while under the logging latch. |
void |
readFromLog(ByteBuffer itemBuffer,
byte entryTypeVersion)
Initialize this object from the data in itemBuf. |
(package private) abstract void |
rebuildINList(INList inList)
Add yourself to the in memory list if you're a type of node that should belong. |
static void |
setLastNodeId(long id)
|
(package private) void |
setNodeId(long nid)
|
String |
shortDescription()
|
String |
toString()
Default toString method at the root of the tree. |
void |
verify(byte[] maxKey)
|
void |
writeToLog(ByteBuffer logBuffer)
Serialize this object into the buffer. |
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.LogReadable |
---|
getTransactionId, logEntryIsTransactional |
Constructor Detail |
---|
protected Node(boolean init)
Method Detail |
---|
public static void setLastNodeId(long id)
public static long getNextNodeId()
public static long getLastId()
public void postFetchInit(DatabaseImpl db, long sourceLsn) throws DatabaseException
DatabaseException
public long getNodeId()
void setNodeId(long nid)
public void verify(byte[] maxKey) throws DatabaseException
DatabaseException
public boolean containsDuplicates()
int getLevel()
boolean matchLNByNodeId(TreeLocation location, long nodeId) throws DatabaseException
DatabaseException
abstract void rebuildINList(INList inList) throws DatabaseException
DatabaseException
abstract void accountForSubtreeRemoval(INList inList, UtilizationTracker tracker) throws DatabaseException
DatabaseException
abstract boolean isValidForDelete() throws DatabaseException
DatabaseException
protected abstract boolean isSoughtNode(long nid, boolean updateGeneration) throws DatabaseException
DatabaseException
protected abstract boolean canBeAncestor(boolean targetContainsDuplicates)
protected long getMemorySizeIncludedByParent()
public String toString()
toString
in class Object
public void dump(int nSpaces)
String dumpString(int nSpaces, boolean dumpTags)
public String shortDescription()
public String getType()
public abstract LogEntryType getLogType()
LoggableObject
getLogType
in interface LoggableObject
LoggableObject.getLogType()
public boolean marshallOutsideWriteLatch()
LoggableObject
marshallOutsideWriteLatch
in interface LoggableObject
By default, nodes can be marshalled outside the log write latch.
public boolean countAsObsoleteWhenLogged()
LoggableObject
countAsObsoleteWhenLogged
in interface LoggableObject
LoggableObject.countAsObsoleteWhenLogged()
public void postLogWork(long justLoggedLsn) throws DatabaseException
LoggableObject
postLogWork
in interface LoggableObject
DatabaseException
LoggableObject.postLogWork(long)
public int getLogSize()
getLogSize
in interface LogWritable
LogWritable.getLogSize()
public void writeToLog(ByteBuffer logBuffer)
LogWritable
writeToLog
in interface LogWritable
logBuffer
- is the destination bufferLogWritable.writeToLog(java.nio.ByteBuffer)
public void readFromLog(ByteBuffer itemBuffer, byte entryTypeVersion) throws LogException
LogReadable
readFromLog
in interface LogReadable
LogException
LogReadable.readFromLog(java.nio.ByteBuffer, byte)
public void dumpLog(StringBuffer sb, boolean verbose)
LogReadable
dumpLog
in interface LogReadable
sb
- destination string bufferverbose
- if true, dump the full, verbose versionLogReadable.dumpLog(java.lang.StringBuffer, boolean)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |