|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.tree.ChildReference
public 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(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 | |
---|---|
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. |
boolean |
getMigrate()
Get the entry migrate status. |
(package private) byte |
getState()
|
Node |
getTarget()
Return the target for this ChildReference. |
long |
getTransactionId()
|
boolean |
isKnownDeleted()
|
void |
readFromLog(ByteBuffer itemBuffer,
byte entryTypeVersion)
Initialize this object from the data in itemBuf. |
void |
setKey(byte[] key)
Set the key for this ChildReference. |
void |
setLsn(long lsn)
Sets the target LSN for this ChildReference. |
void |
setMigrate(boolean migrate)
Set the entry migrate status. |
void |
setTarget(Node target)
Sets the target for this ChildReference. |
String |
toString()
|
(package private) void |
updateLsnAfterOptionalLog(DatabaseImpl dbImpl,
long lsn)
Do deferredWrite optional logging check. |
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)
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 updateLsnAfterOptionalLog(DatabaseImpl dbImpl, long lsn)
public boolean isKnownDeleted()
public boolean getMigrate()
public void setMigrate(boolean migrate)
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, byte entryTypeVersion)
Loggable
readFromLog
in interface Loggable
Loggable.readFromLog(java.nio.ByteBuffer, byte)
public void dumpLog(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()
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 |