| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearTarget()
Clear the target for this ChildReference.
|
void |
dumpLog(StringBuilder sb,
boolean verbose)
Write the object into the string buffer for log dumping.
|
String |
dumpString(int nspaces,
boolean dumpTags) |
Node |
fetchTarget(DatabaseImpl database,
IN parent)
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.
|
Node |
getTarget()
Return the target for this ChildReference.
|
long |
getTransactionId() |
boolean |
isKnownDeleted() |
boolean |
logicalEquals(Loggable other) |
void |
readFromLog(ByteBuffer itemBuffer,
int entryVersion)
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 |
setTarget(Node target)
Sets the target for this ChildReference.
|
String |
toString() |
void |
writeToLog(ByteBuffer logBuffer)
Serialize this object into the buffer.
|
public ChildReference()
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 parent) throws DatabaseException
database - The database that this ChildReference resides in.parent - 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.DatabaseExceptionpublic Node getTarget()
public void setTarget(Node target)
public void clearTarget()
public long getLsn()
public void setLsn(long lsn)
lsn - the target LSN.public boolean isKnownDeleted()
public int getLogSize()
getLogSize in interface LoggableLoggable.getLogSize()public void writeToLog(ByteBuffer logBuffer)
LoggablewriteToLog in interface LoggablelogBuffer - is the destination bufferLoggable.writeToLog(java.nio.ByteBuffer)public void readFromLog(ByteBuffer itemBuffer, int entryVersion)
LoggablereadFromLog in interface LoggableitemBuffer - the source bufferentryVersion - the log version of the dataLoggable.readFromLog(java.nio.ByteBuffer, int)public void dumpLog(StringBuilder sb, boolean verbose)
LoggabledumpLog in interface Loggablesb - destination string bufferverbose - if true, dump the full, verbose versionLoggable.dumpLog(java.lang.StringBuilder, boolean)public long getTransactionId()
getTransactionId in interface LoggableLoggable.getTransactionId()public boolean logicalEquals(Loggable other)
logicalEquals in interface LoggableAlways return false, this item should never be compared.public String dumpString(int nspaces, boolean dumpTags)
Copyright © 2024. All rights reserved.