|
|||||||||
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
public class 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 Node
protected 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
DatabaseException
void addToDirtyMap(Map dirtyMap)
void rebuildINList(INList inList)
rebuildINList
in class Node
void accountForSubtreeRemoval(INList inList, UtilizationTracker tracker)
accountForSubtreeRemoval
in class Node
public long getMemorySizeIncludedByParent()
getMemorySizeIncludedByParent
in class Node
public 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.
DatabaseException
protected LogEntryType getTransactionalLogType()
public boolean countAsObsoleteWhenLogged()
LoggableObject
countAsObsoleteWhenLogged
in interface LoggableObject
countAsObsoleteWhenLogged
in class Node
LoggableObject.countAsObsoleteWhenLogged()
public LogEntryType getLogType()
LoggableObject
getLogType
in interface LoggableObject
getLogType
in class Node
LoggableObject.getLogType()
public int getLogSize()
getLogSize
in interface LogWritable
getLogSize
in class Node
LogWritable.getLogSize()
public void writeToLog(ByteBuffer logBuffer)
LogWritable
writeToLog
in interface LogWritable
writeToLog
in class Node
logBuffer
- is the destination bufferLogWritable.writeToLog(java.nio.ByteBuffer)
public void readFromLog(ByteBuffer itemBuffer, byte entryTypeVersion) throws LogException
LogReadable
readFromLog
in interface LogReadable
readFromLog
in class Node
LogException
LogReadable.readFromLog(java.nio.ByteBuffer, byte)
public void dumpLog(StringBuffer sb, boolean verbose)
LogReadable
dumpLog
in interface LogReadable
dumpLog
in class Node
sb
- destination string bufferverbose
- if true, dump the full, verbose versionLogReadable.dumpLog(java.lang.StringBuffer, boolean)
public boolean logEntryIsTransactional()
logEntryIsTransactional
in interface LogReadable
LogReadable#logEntryIsTransactional.
public long getTransactionId()
getTransactionId
in interface LogReadable
LogReadable.getTransactionId()
protected void dumpLogAdditional(StringBuffer sb)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |