Modifier | Constructor and Description |
---|---|
protected |
Node(boolean init)
Create a new node, assigning it the next available node id.
|
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
canBeAncestor(boolean targetContainsDuplicates) |
boolean |
containsDuplicates() |
void |
dump(int nSpaces) |
void |
dumpLog(java.lang.StringBuffer sb,
boolean verbose)
Write the object into the string buffer for log dumping.
|
static long |
getLastId()
Get the latest id, for checkpointing.
|
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.
|
static long |
getNextNodeId()
Increment and return the next usable id.
|
long |
getNodeId() |
long |
getTransactionId() |
java.lang.String |
getType() |
protected abstract boolean |
isSoughtNode(long nid,
boolean updateGeneration) |
void |
latchShared() |
void |
postFetchInit(DatabaseImpl db,
long sourceLsn)
Initialize a node that has been faulted in from the log
|
void |
readFromLog(java.nio.ByteBuffer itemBuffer,
byte entryTypeVersion)
Initialize this object from the data in itemBuf.
|
void |
releaseLatch() |
static void |
setLastNodeId(long id) |
java.lang.String |
shortDescription() |
java.lang.String |
toString()
Default toString method at the root of the tree.
|
void |
verify(byte[] maxKey) |
void |
writeToLog(java.nio.ByteBuffer logBuffer)
Serialize this object into the buffer.
|
protected Node(boolean init)
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()
public void latchShared() throws DatabaseException
DatabaseException
public void releaseLatch() throws LatchNotHeldException
LatchNotHeldException
public void verify(byte[] maxKey) throws DatabaseException
DatabaseException
public boolean containsDuplicates()
protected abstract boolean isSoughtNode(long nid, boolean updateGeneration) throws DatabaseException
DatabaseException
protected abstract boolean canBeAncestor(boolean targetContainsDuplicates)
protected long getMemorySizeIncludedByParent()
public java.lang.String toString()
toString
in class java.lang.Object
public void dump(int nSpaces)
public java.lang.String shortDescription()
public java.lang.String getType()
public abstract LogEntryType getLogType()
public int getLogSize()
getLogSize
in interface Loggable
Loggable.getLogSize()
public void writeToLog(java.nio.ByteBuffer logBuffer)
Loggable
writeToLog
in interface Loggable
logBuffer
- is the destination bufferLoggable.writeToLog(java.nio.ByteBuffer)
public void readFromLog(java.nio.ByteBuffer itemBuffer, byte entryTypeVersion) throws LogException
Loggable
readFromLog
in interface Loggable
LogException
Loggable.readFromLog(java.nio.ByteBuffer, byte)
public void dumpLog(java.lang.StringBuffer sb, boolean verbose)
Loggable
dumpLog
in interface Loggable
sb
- destination string bufferverbose
- if true, dump the full, verbose versionLoggable.dumpLog(java.lang.StringBuffer, boolean)
public long getTransactionId()
getTransactionId
in interface Loggable
Loggable.getTransactionId()