|
|||||||||
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.
Field Summary | |
---|---|
static long |
NULL_NODE_ID
|
Constructor Summary | |
---|---|
protected |
Node()
Only for subclasses. |
protected |
Node(EnvironmentImpl envImpl,
boolean replicated)
Create a new node, assigning it the next available node id. |
Method Summary | |
---|---|
(package private) abstract void |
accountForDeferredWriteSubtreeRemoval(INList inList,
IN subtreeParent)
For a deferred-write DB, account for a deleted subtree. |
(package private) abstract void |
accountForSubtreeRemoval(INList inList,
LocalUtilizationTracker tracker)
For a regular (not deferred-write) DB, account for a deleted subtree. |
protected abstract boolean |
canBeAncestor(boolean targetContainsDuplicates)
|
boolean |
containsDuplicates()
|
void |
dump(int nSpaces)
|
void |
dumpLog(StringBuilder sb,
boolean verbose)
Write the object into the string buffer for log dumping. |
(package private) String |
dumpString(int nSpaces,
boolean dumpTags)
|
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()
|
protected long |
getMemorySizeIncludedByParent()
Return the approximate size of this node in memory, if this size should be included in it's parents memory accounting. |
long |
getNodeId()
|
long |
getTransactionId()
|
String |
getType()
|
abstract void |
incFetchStats(EnvironmentImpl envImpl,
boolean isMiss)
We categorize fetch stats by the type of node, so node subclasses update different stats. |
protected abstract boolean |
isSoughtNode(long nid,
CacheMode cacheMode,
boolean doFetch)
|
(package private) abstract boolean |
isValidForDelete()
|
void |
latchShared()
|
void |
latchShared(CacheMode ignore)
|
(package private) boolean |
matchLNByNodeId(TreeLocation location,
long nodeId,
CacheMode cachemode)
|
void |
postFetchInit(DatabaseImpl db,
long sourceLsn)
|
void |
readFromLog(ByteBuffer itemBuffer,
int entryVersion)
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. |
void |
releaseLatch()
|
(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.Loggable |
---|
logicalEquals |
Field Detail |
---|
public static final long NULL_NODE_ID
Constructor Detail |
---|
protected Node()
protected Node(EnvironmentImpl envImpl, boolean replicated)
Method Detail |
---|
public void postFetchInit(DatabaseImpl db, long sourceLsn) throws DatabaseException
DatabaseException
- from subclasses.public long getNodeId()
void setNodeId(long nid)
public void latchShared() throws DatabaseException
DatabaseException
- from subclasses.public void latchShared(CacheMode ignore) throws DatabaseException
DatabaseException
- from subclasses.public void releaseLatch()
public void verify(byte[] maxKey) throws DatabaseException
DatabaseException
- from subclasses.public boolean containsDuplicates()
public int getLevel()
boolean matchLNByNodeId(TreeLocation location, long nodeId, CacheMode cachemode) throws DatabaseException
DatabaseException
abstract void rebuildINList(INList inList) throws DatabaseException
DatabaseException
abstract void accountForSubtreeRemoval(INList inList, LocalUtilizationTracker tracker) throws DatabaseException
DatabaseException
abstract void accountForDeferredWriteSubtreeRemoval(INList inList, IN subtreeParent) throws DatabaseException
DatabaseException
abstract boolean isValidForDelete() throws DatabaseException
DatabaseException
protected abstract boolean isSoughtNode(long nid, CacheMode cacheMode, boolean doFetch) 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 void incFetchStats(EnvironmentImpl envImpl, boolean isMiss)
public abstract LogEntryType getLogType()
public int getLogSize()
getLogSize
in interface Loggable
Loggable.getLogSize()
public void writeToLog(ByteBuffer logBuffer)
Loggable
writeToLog
in interface Loggable
logBuffer
- is the destination bufferLoggable.writeToLog(java.nio.ByteBuffer)
public void readFromLog(ByteBuffer itemBuffer, int entryVersion)
Loggable
readFromLog
in interface Loggable
Loggable.readFromLog(java.nio.ByteBuffer, int)
public void dumpLog(StringBuilder sb, boolean verbose)
Loggable
dumpLog
in interface Loggable
sb
- destination string bufferverbose
- if true, dump the full, verbose versionLoggable.dumpLog(java.lang.StringBuilder, boolean)
public long getTransactionId()
getTransactionId
in interface Loggable
Loggable.getTransactionId()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |