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(java.lang.StringBuilder sb,
boolean verbose)
Write the object into the string buffer for log dumping.
|
java.lang.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() |
boolean |
logicalEquals(Loggable other) |
void |
readFromLog(java.nio.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 |
setMigrate(boolean migrate)
Set the entry migrate status.
|
void |
setTarget(Node target)
Sets the target for this ChildReference.
|
java.lang.String |
toString() |
(package private) void |
updateLsnAfterOptionalLog(DatabaseImpl dbImpl,
long lsn)
Do deferredWrite optional logging check.
|
void |
writeToLog(java.nio.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 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(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, int entryVersion)
Loggable
readFromLog
in interface Loggable
Loggable.readFromLog(java.nio.ByteBuffer, int)
public void dumpLog(java.lang.StringBuilder sb, boolean verbose)
Loggable
dumpLog
in interface Loggable
sb
- destination string bufferverbose
- if true, dump the full, verbose versionLoggable.dumpLog(java.lang.StringBuilder, boolean)
public long getTransactionId()
getTransactionId
in interface Loggable
Loggable.getTransactionId()
public boolean logicalEquals(Loggable other)
logicalEquals
in interface Loggable
Always return false, this item should never be compared.
public java.lang.String dumpString(int nspaces, boolean dumpTags)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright (c) 2004-2012 Oracle. All rights reserved.