|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sleepycat.je.tree.ChildReference
A ChildReference is a reference in the tree from parent to child. It contains a node reference, key, and LSN.
| Constructor Summary | |
(package private) |
ChildReference()
Construct an empty child reference, for reading from the log. |
(package private) |
ChildReference(Key key,
long lsn,
boolean knownDeleted)
Construct a ChildReference. |
|
ChildReference(Node target,
Key key,
long lsn)
Construct a ChildReference. |
| Method Summary | |
(package private) void |
clearKnownDeleted()
Set knownDeleted 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. |
(package private) Node |
fetchTargetIgnoreKnownDeleted(DatabaseImpl database,
IN in)
Same as fetchTarget except that if knownDeleted is set this does not thrown an exception. |
Key |
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)
Initialize this object from the data in itemBuf. |
void |
setKey(Key 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. |
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,
Key key,
long lsn)
ChildReference(Key key,
long lsn,
boolean knownDeleted)
| Method Detail |
public Key getKey()
public void setKey(Key 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
Node fetchTargetIgnoreKnownDeleted(DatabaseImpl database,
IN in)
throws DatabaseException
DatabaseExceptionbyte getState()
public Node getTarget()
public void setTarget(Node target)
public void clearTarget()
public long getLsn()
public void setLsn(long lsn)
public boolean isKnownDeleted()
void setKnownDeleted()
void clearKnownDeleted()
public int getLogSize()
getLogSize in interface LogWritableLogWritable.getLogSize()public void writeToLog(ByteBuffer logBuffer)
LogWritable
writeToLog in interface LogWritablelogBuffer - is the destination bufferLogWritable.writeToLog(java.nio.ByteBuffer)public void readFromLog(ByteBuffer itemBuffer)
LogReadable
readFromLog in interface LogReadableLogReadable.readFromLog(java.nio.ByteBuffer)
public void dumpLog(StringBuffer sb,
boolean verbose)
LogReadable
dumpLog in interface LogReadablesb - destination string bufferverbose - if true, dump the full, verbose versionLogReadable.dumpLog(java.lang.StringBuffer, boolean)public boolean logEntryIsTransactional()
logEntryIsTransactional in interface LogReadableLogReadable.logEntryIsTransactional()public long getTransactionId()
getTransactionId in interface LogReadableLogReadable.getTransactionId()
String dumpString(int nspaces,
boolean dumpTags)
public String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||