|
|||||||||
| 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.IN
com.sleepycat.je.tree.BIN
com.sleepycat.je.tree.DBIN
public final class DBIN
A DBIN represents an Duplicate Bottom Internal Node in the JE tree.
| Field Summary |
|---|
| Fields inherited from class com.sleepycat.je.tree.IN |
|---|
ACCUMULATED_LIMIT, BIN_LEVEL, DBMAP_LEVEL, EXACT_MATCH, INSERT_SUCCESS, latch, LEVEL_MASK, MAIN_LEVEL, MAX_LEVEL, MAY_EVICT_LNS, MAY_EVICT_NODE, MAY_NOT_EVICT, MIN_LEVEL |
| Constructor Summary | |
|---|---|
DBIN()
|
|
DBIN(DatabaseImpl db,
byte[] identifierKey,
int maxEntriesPerNode,
byte[] dupKey,
int level)
|
|
| Method Summary | |
|---|---|
(package private) void |
accumulateStats(TreeWalkerStatsAccumulator acc)
|
java.lang.String |
beginTag()
|
protected boolean |
canBeAncestor(boolean targetContainsDuplicates)
|
protected long |
computeMemorySize()
Count up the memory usage attributable to this node alone. |
static long |
computeOverhead(DbConfigManager configManager)
|
boolean |
containsDuplicates()
|
protected IN |
createNewInstance(byte[] identifierKey,
int maxEntries,
int level)
Create a new DBIN. |
BINReference |
createReference()
Create a holder object that encapsulates information about this BIN for the INCompressor. |
protected void |
dumpLogAdditional(java.lang.StringBuffer sb)
DBINS need to dump their dup key |
java.lang.String |
dumpString(int nSpaces,
boolean dumpTags)
For unit test support: |
java.lang.String |
endTag()
|
protected int |
generateLevel(DatabaseId dbId,
int newLevel)
|
(package private) LogEntryType |
getBINDeltaType()
|
byte[] |
getChildKey(IN child)
Get the key (dupe or identifier) in child that is used to locate it in 'this' node. |
(package private) BIN |
getCursorBIN(CursorImpl cursor)
The following four methods access the correct fields in a cursor depending on whether "this" is a BIN or DBIN. |
(package private) BIN |
getCursorBINToBeRemoved(CursorImpl cursor)
|
(package private) int |
getCursorIndex(CursorImpl cursor)
|
byte[] |
getDupKey()
Return the key for this duplicate set. |
byte[] |
getDupTreeKey()
Return the key for navigating through the duplicate tree. |
java.util.Comparator |
getKeyComparator()
Return the comparator function to be used for DBINs. |
int |
getLogSize()
|
LogEntryType |
getLogType()
|
byte[] |
getMainTreeKey()
Return the key for navigating through the main tree. |
protected long |
getMemoryOverhead(MemoryBudget mb)
|
(package private) boolean |
hasPinnedChildren()
Returns whether any resident children are not LNs (are INs). |
(package private) boolean |
isAlwaysLatchedExclusively()
|
(package private) boolean |
matchLNByNodeId(TreeLocation location,
long nodeId)
|
void |
readFromLog(java.nio.ByteBuffer itemBuffer,
byte entryTypeVersion)
Initialize this object from the data in itemBuf. |
byte[] |
selectKey(byte[] mainTreeKey,
byte[] dupTreeKey)
|
(package private) void |
setCursorBIN(CursorImpl cursor,
BIN bin)
|
(package private) void |
setCursorIndex(CursorImpl cursor,
int index)
|
java.lang.String |
shortClassName()
|
void |
writeToLog(java.nio.ByteBuffer logBuffer)
Serialize this object into the buffer. |
| Methods inherited from class com.sleepycat.je.tree.Node |
|---|
dump, getLastId, getMemorySizeIncludedByParent, getNextNodeId, getNodeId, getTransactionId, getType, setLastNodeId, setNodeId, shortDescription |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.sleepycat.je.log.Loggable |
|---|
dumpLog, getTransactionId |
| Constructor Detail |
|---|
public DBIN()
public DBIN(DatabaseImpl db,
byte[] identifierKey,
int maxEntriesPerNode,
byte[] dupKey,
int level)
| Method Detail |
|---|
protected IN createNewInstance(byte[] identifierKey,
int maxEntries,
int level)
createNewInstance in class BINboolean isAlwaysLatchedExclusively()
isAlwaysLatchedExclusively in class BIN
protected int generateLevel(DatabaseId dbId,
int newLevel)
generateLevel in class INpublic final java.util.Comparator getKeyComparator()
getKeyComparator in class BINpublic byte[] getDupKey()
getDupKey in class IN
public byte[] getChildKey(IN child)
throws DatabaseException
getChildKey in class BINDatabaseException
public byte[] selectKey(byte[] mainTreeKey,
byte[] dupTreeKey)
selectKey in class INpublic byte[] getDupTreeKey()
getDupTreeKey in class INpublic byte[] getMainTreeKey()
getMainTreeKey in class INpublic boolean containsDuplicates()
containsDuplicates in class NodeLogEntryType getBINDeltaType()
getBINDeltaType in class BINpublic BINReference createReference()
BIN
createReference in class BINprotected long computeMemorySize()
computeMemorySize in class IN
public static long computeOverhead(DbConfigManager configManager)
throws DatabaseException
DatabaseExceptionprotected long getMemoryOverhead(MemoryBudget mb)
getMemoryOverhead in class BINprotected boolean canBeAncestor(boolean targetContainsDuplicates)
canBeAncestor in class BINboolean hasPinnedChildren()
IN
hasPinnedChildren in class BINBIN getCursorBIN(CursorImpl cursor)
getCursorBIN in class BINBIN getCursorBINToBeRemoved(CursorImpl cursor)
getCursorBINToBeRemoved in class BINint getCursorIndex(CursorImpl cursor)
getCursorIndex in class BIN
void setCursorBIN(CursorImpl cursor,
BIN bin)
setCursorBIN in class BIN
void setCursorIndex(CursorImpl cursor,
int index)
setCursorIndex in class BIN
boolean matchLNByNodeId(TreeLocation location,
long nodeId)
throws DatabaseException
matchLNByNodeId in class NodeDatabaseExceptionvoid accumulateStats(TreeWalkerStatsAccumulator acc)
accumulateStats in class BINpublic java.lang.String beginTag()
beginTag in class BINpublic java.lang.String endTag()
endTag in class BIN
public java.lang.String dumpString(int nSpaces,
boolean dumpTags)
dumpString in class INpublic LogEntryType getLogType()
getLogType in class BINNode.getLogType()public int getLogSize()
getLogSize in interface LoggablegetLogSize in class INLoggable.getLogSize()public void writeToLog(java.nio.ByteBuffer logBuffer)
Loggable
writeToLog in interface LoggablewriteToLog in class INlogBuffer - is the destination bufferLoggable.writeToLog(java.nio.ByteBuffer)
public void readFromLog(java.nio.ByteBuffer itemBuffer,
byte entryTypeVersion)
throws LogException
Loggable
readFromLog in interface LoggablereadFromLog in class INLogExceptionIN.readFromLog(java.nio.ByteBuffer, byte)protected void dumpLogAdditional(java.lang.StringBuffer sb)
dumpLogAdditional in class INpublic java.lang.String shortClassName()
shortClassName in class BIN
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||