Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
void |
clearTarget()
Clear the target for this ChildReference.
|
void |
dumpLog(java.lang.StringBuffer sb,
boolean verbose)
Write the object into the string buffer for log dumping.
|
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.
|
Node |
getTarget()
Return the target for this ChildReference.
|
long |
getTransactionId() |
boolean |
isKnownDeleted() |
void |
readFromLog(java.nio.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.
|
java.lang.String |
toString() |
void |
writeToLog(java.nio.ByteBuffer logBuffer)
Serialize this object into the buffer.
|
public ChildReference(Node target, byte[] key, long lsn)
public ChildReference(Node target, byte[] key, long lsn, byte existingState)
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
public Node getTarget()
public void setTarget(Node target)
public void clearTarget()
public long getLsn()
public void setLsn(long lsn)
the
- target LSN.public boolean isKnownDeleted()
public boolean getMigrate()
public void setMigrate(boolean migrate)
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)
Loggable
readFromLog
in interface Loggable
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()
public java.lang.String toString()
toString
in class java.lang.Object