|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sleepycat.je.tree.Node
com.sleepycat.je.tree.LN
An LN represents a Leaf Node in the JE tree.
| Constructor Summary | |
LN()
Create an empty LN, to be filled in from the log. |
|
LN(byte[] data)
Create a new LN from a byte array. |
|
LN(DatabaseEntry dbt)
Create a new LN from a DatabaseEntry. |
|
| Method Summary | |
(package private) void |
accountForSubtreeRemoval(INList inList,
UtilizationTracker tracker)
No need to do anything, stop the search. |
(package private) void |
addToDirtyMap(Map dirtyMap)
Add yourself to the dirty list if you're dirty. |
String |
beginTag()
|
protected boolean |
canBeAncestor(boolean targetContainsDuplicates)
A LN can never be the ancestor of another node. |
byte[] |
copyData()
|
boolean |
countAsObsoleteWhenLogged()
Returns true if this item should be counted as obsoleted when logged. |
long |
delete(DatabaseImpl database,
byte[] lnKey,
byte[] dupKey,
long oldLsn,
Locker locker)
Delete this LN's data and log the new version. |
void |
dumpLog(StringBuffer sb,
boolean verbose)
Write the object into the string buffer for log dumping. |
protected void |
dumpLogAdditional(StringBuffer sb)
|
String |
dumpString(int nSpaces,
boolean dumpTags)
|
String |
endTag()
|
byte[] |
getData()
|
int |
getLogSize()
|
LogEntryType |
getLogType()
All objects that are reponsible for a generating a type of log entry must implement this. |
long |
getMemorySizeIncludedByParent()
Compute the approximate size of this node in memory for evictor invocation purposes. |
protected LogEntryType |
getTransactionalLogType()
Log type for transactional entries |
long |
getTransactionId()
Never called. |
boolean |
isDeleted()
|
protected boolean |
isSoughtNode(long nid,
boolean updateGeneration)
A LN can never be a child in the search chain. |
(package private) boolean |
isValidForDelete()
|
long |
log(EnvironmentImpl env,
DatabaseId dbId,
byte[] key,
long oldLsn,
Locker locker)
Log this LN. |
boolean |
logEntryIsTransactional()
Never called. |
long |
logProvisional(EnvironmentImpl env,
DatabaseId dbId,
byte[] key,
long oldLsn)
Log a provisional, non-txnal version of a ln. |
(package private) void |
makeDeleted()
|
long |
modify(byte[] newData,
DatabaseImpl database,
byte[] lnKey,
long oldLsn,
Locker locker)
Modify the LN's data and log the new version. |
void |
readFromLog(ByteBuffer itemBuffer,
byte entryTypeVersion)
Initialize this object from the data in itemBuf. |
(package private) void |
rebuildINList(INList inList)
Add yourself to the in memory list if you're a type of node that should belong. |
void |
writeToLog(ByteBuffer logBuffer)
Serialize this object into the buffer. |
| Methods inherited from class com.sleepycat.je.tree.Node |
containsDuplicates, dump, getLastId, getLevel, getNextNodeId, getNodeId, getType, marshallOutsideWriteLatch, matchLNByNodeId, postFetchInit, postLogWork, setLastNodeId, setNodeId, shortDescription, toString, verify |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.sleepycat.je.log.LoggableObject |
marshallOutsideWriteLatch, postLogWork |
| Constructor Detail |
public LN()
public LN(byte[] data)
public LN(DatabaseEntry dbt)
| Method Detail |
public byte[] getData()
public byte[] copyData()
public boolean isDeleted()
void makeDeleted()
boolean isValidForDelete()
isValidForDelete in class Node
protected boolean isSoughtNode(long nid,
boolean updateGeneration)
isSoughtNode in class Nodeprotected boolean canBeAncestor(boolean targetContainsDuplicates)
canBeAncestor in class Node
public long delete(DatabaseImpl database,
byte[] lnKey,
byte[] dupKey,
long oldLsn,
Locker locker)
throws DatabaseException
DatabaseException
public long modify(byte[] newData,
DatabaseImpl database,
byte[] lnKey,
long oldLsn,
Locker locker)
throws DatabaseException
DatabaseExceptionvoid addToDirtyMap(Map dirtyMap)
void rebuildINList(INList inList)
rebuildINList in class Node
void accountForSubtreeRemoval(INList inList,
UtilizationTracker tracker)
accountForSubtreeRemoval in class Nodepublic long getMemorySizeIncludedByParent()
getMemorySizeIncludedByParent in class Nodepublic String beginTag()
public String endTag()
public String dumpString(int nSpaces,
boolean dumpTags)
dumpString in class Node
public long logProvisional(EnvironmentImpl env,
DatabaseId dbId,
byte[] key,
long oldLsn)
throws DatabaseException
env - the environment.dbId - database id of this node. (Not stored in LN)key - key of this node. (Not stored in LN)oldLsn - is the LSN of the previous version or null.
DatabaseException
public long log(EnvironmentImpl env,
DatabaseId dbId,
byte[] key,
long oldLsn,
Locker locker)
throws DatabaseException
env - the environment.dbId - database id of this node. (Not stored in LN)key - key of this node. (Not stored in LN)oldLsn - is the LSN of the previous version or null.locker - owning locker.
DatabaseExceptionprotected LogEntryType getTransactionalLogType()
public boolean countAsObsoleteWhenLogged()
LoggableObject
countAsObsoleteWhenLogged in interface LoggableObjectcountAsObsoleteWhenLogged in class NodeLoggableObject.countAsObsoleteWhenLogged()public LogEntryType getLogType()
LoggableObject
getLogType in interface LoggableObjectgetLogType in class NodeLoggableObject.getLogType()public int getLogSize()
getLogSize in interface LogWritablegetLogSize in class NodeLogWritable.getLogSize()public void writeToLog(ByteBuffer logBuffer)
LogWritable
writeToLog in interface LogWritablewriteToLog in class NodeLogWritable.writeToLog(java.nio.ByteBuffer)
public void readFromLog(ByteBuffer itemBuffer,
byte entryTypeVersion)
throws LogException
LogReadable
readFromLog in interface LogReadablereadFromLog in class NodeLogExceptionLogReadable.readFromLog(java.nio.ByteBuffer, byte)
public void dumpLog(StringBuffer sb,
boolean verbose)
LogReadable
dumpLog in interface LogReadabledumpLog in class NodeLogReadable.dumpLog(java.lang.StringBuffer, boolean)public boolean logEntryIsTransactional()
logEntryIsTransactional in interface LogReadableLogReadable#logEntryIsTransactional.public long getTransactionId()
getTransactionId in interface LogReadableLogReadable.getTransactionId()protected void dumpLogAdditional(StringBuffer sb)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||