|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.tree.ChildReference
public final class ChildReference
A ChildReference is a reference in the tree from parent to child. It contains a node reference, key, and LSN.
Constructor Summary | |
---|---|
ChildReference()
Construct an empty child reference, for reading from the log. |
|
ChildReference(byte[] key,
long lsn,
boolean knownDeleted)
Construct a ChildReference. |
|
ChildReference(Node target,
byte[] key,
long lsn)
Construct a ChildReference for inserting a new entry. |
|
ChildReference(Node target,
byte[] key,
long lsn,
byte existingState)
Construct a ChildReference for inserting an existing entry. |
Method Summary | |
---|---|
(package private) void |
clearKnownDeleted()
Set knownDeleted to false. |
(package private) void |
clearPendingDeleted(int idx)
Set pendingDeleted to false. |
void |
clearTarget()
Clear the target for this ChildReference. |
void |
dumpLog(StringBuffer sb,
boolean verbose)
Write the object into the string buffer for log dumping. |
(package private) String |
dumpString(int nspaces,
boolean dumpTags)
|
Node |
fetchTarget(DatabaseImpl database,
IN in)
Fetch the target object that this ChildReference refers to. |
byte[] |
getKey()
Return the key for this ChildReference. |
int |
getLogSize()
|
long |
getLsn()
Return the LSN for this ChildReference. |
(package private) byte |
getState()
|
Node |
getTarget()
Return the target for this ChildReference. |
long |
getTransactionId()
|
boolean |
isKnownDeleted()
|
boolean |
logEntryIsTransactional()
|
void |
readFromLog(ByteBuffer itemBuffer,
byte entryTypeVersion)
Initialize this object from the data in itemBuf. |
void |
setKey(byte[] key)
Set the key for this ChildReference. |
(package private) void |
setKnownDeleted()
Set knownDeleted to true. |
void |
setLsn(long lsn)
Sets the target LSN for this ChildReference. |
(package private) void |
setPendingDeleted(int idx)
Set pendingDeleted to true. |
void |
setTarget(Node target)
Sets the target for this ChildReference. |
String |
toString()
|
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 |
Constructor Detail |
---|
ChildReference()
public ChildReference(Node target, byte[] key, long lsn)
public ChildReference(Node target, byte[] key, long lsn, byte existingState)
ChildReference(byte[] key, long lsn, boolean knownDeleted)
Method Detail |
---|
public byte[] getKey()
public void setKey(byte[] key)
public Node fetchTarget(DatabaseImpl database, IN in) throws DatabaseException
database
- The database that this ChildReference resides in.in
- The IN that this ChildReference lives in. If
the target is fetched (i.e. it is null on entry), then the
total in memory count is invalidated in the IN. May be null.
For example, the root is a ChildReference and there is no parent IN
when the rootIN is fetched in.
DatabaseException
byte getState()
public Node getTarget()
public void setTarget(Node target)
public void clearTarget()
public long getLsn()
public void setLsn(long lsn)
the
- target LSN.void setPendingDeleted(int idx)
void clearPendingDeleted(int idx)
public boolean isKnownDeleted()
void setKnownDeleted()
void clearKnownDeleted()
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)
LogReadable
readFromLog
in interface LogReadable
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)
public boolean logEntryIsTransactional()
logEntryIsTransactional
in interface LogReadable
LogReadable.logEntryIsTransactional()
public long getTransactionId()
getTransactionId
in interface LogReadable
LogReadable.getTransactionId()
String dumpString(int nspaces, boolean dumpTags)
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |