|
||||||||||
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
A BIN represents a Bottom Internal Node in the JE tree.
Field Summary | |
protected Set |
cursorSet
|
Fields inherited from class com.sleepycat.je.tree.IN |
DBMAP_LEVEL, evictionProhibited, EXACT_MATCH, INSERT_SUCCESS, MAIN_LEVEL, MAX_LEVEL, MIN_LEVEL |
Constructor Summary | |
BIN()
|
|
BIN(DatabaseImpl db,
Key identifierKey,
int maxEntriesPerNode,
int level)
|
Method Summary | |
(package private) void |
accumulateStats(TreeWalkerStatsAccumulator acc)
|
void |
addCursor(CursorImpl cursor)
Register a cursor with this bin. |
(package private) void |
adjustCursors(IN newSibling,
int newSiblingLow,
int newSiblingHigh)
Adjust any cursors that are referring to this BIN. |
(package private) void |
adjustCursorsForInsert(int insertIndex)
Adjust cursors referring to this BIN following an insert. |
(package private) void |
adjustCursorsForMutation(int binIndex,
DBIN dupBin,
int dupBinIndex,
CursorImpl excludeCursor)
Adjust cursors referring to the given binIndex in this BIN following a mutation of the entry from an LN to a DIN. |
String |
beginTag()
|
protected boolean |
canBeAncestor(boolean targetContainsDuplicates)
|
protected boolean |
childrenAreEvictable()
|
void |
clearKnownDeleted(int index)
Clear the known deleted flag. |
boolean |
compress(BINReference binRef)
Compress this BIN by removing any entries that are deleted. |
static long |
computeOverhead(DbConfigManager configManager)
|
protected IN |
createNewInstance(Key identifierKey,
int maxEntries,
int level)
Create a new BIN. |
BINReference |
createReference()
Create a holder object that encapsulates information about this BIN for the INCompressor. |
protected void |
descendOnParentSearch(SearchResult result,
boolean targetContainsDuplicates,
boolean targetIsRoot,
long targetNodeId,
Node child,
boolean requireExactMatch)
|
String |
endTag()
|
(package private) boolean |
entryZeroKeyComparesLow()
Indicates whether entry 0's key is "special" in that it always compares less than any other key. |
long |
evictLNs()
Reduce memory consumption by evicting all LN targets. |
LogEntryType |
getBINDeltaType()
|
Key |
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) int |
getCursorIndex(CursorImpl cursor)
|
Set |
getCursorSet()
|
Comparator |
getKeyComparator()
Return the relevant user defined comparison function for this type of node. |
long |
getLastDeltaVersion()
|
LogEntryType |
getLogType()
All objects that are reponsible for a generating a type of log entry must implement this. |
protected long |
getMemoryOverhead(MemoryBudget mb)
|
boolean |
isEvictable()
|
(package private) boolean |
isValidForDelete()
Check if this node fits the qualifications for being part of a deletable subtree. |
protected long |
logInternal(LogManager logManager,
boolean allowDeltas,
boolean isProvisional)
Decide how to log this node. |
int |
nCursors()
|
void |
removeCursor(CursorImpl cursor)
Unregister a cursor with this bin. |
void |
setCleanedSinceLastLog()
If cleaned, must log full version. |
protected void |
setCompressedSinceLastLog()
If compressed, must log full version. |
(package private) void |
setCursorBIN(CursorImpl cursor,
BIN bin)
|
(package private) void |
setCursorIndex(CursorImpl cursor,
int index)
|
void |
setKnownDeleted(int index)
Mark this entry as deleted, using the delete flag. |
void |
setKnownDeletedLeaveTarget(int index)
Mark this entry as deleted, using the delete flag. |
String |
shortClassName()
|
(package private) void |
splitSpecial(IN parent,
int parentIndex,
int maxEntriesPerNode,
Key key,
boolean leftSide)
Called when we know we are about to split on behalf of a key that is the minimum (leftSide) or maximum (!leftSide) of this node. |
(package private) boolean |
validateSubtreeBeforeDelete(int index)
|
void |
verifyCursors()
For each cursor in this BIN's cursor set, ensure that the cursor is actually referring to this BIN. |
Methods inherited from class com.sleepycat.je.tree.Node |
containsDuplicates, dump, getLastId, getMemorySizeIncludedByParent, getNextNodeId, getNodeId, getType, marshallOutsideWriteLatch, matchLNByNodeId, postLogWork, 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.LoggableObject |
marshallOutsideWriteLatch, postLogWork |
Methods inherited from interface com.sleepycat.je.log.LogWritable |
getLogSize, writeToLog |
Field Detail |
protected Set cursorSet
Constructor Detail |
public BIN()
public BIN(DatabaseImpl db, Key identifierKey, int maxEntriesPerNode, int level)
Method Detail |
public BINReference createReference()
protected IN createNewInstance(Key identifierKey, int maxEntries, int level)
createNewInstance
in class IN
public Key getChildKey(IN child) throws DatabaseException
getChildKey
in class IN
DatabaseException
public LogEntryType getBINDeltaType()
public long getLastDeltaVersion()
protected void setCompressedSinceLastLog()
setCompressedSinceLastLog
in class IN
public void setCleanedSinceLastLog()
setCleanedSinceLastLog
in class IN
protected void descendOnParentSearch(SearchResult result, boolean targetContainsDuplicates, boolean targetIsRoot, long targetNodeId, Node child, boolean requireExactMatch) throws DatabaseException
descendOnParentSearch
in class IN
DatabaseException
protected boolean canBeAncestor(boolean targetContainsDuplicates)
canBeAncestor
in class IN
public boolean isEvictable()
isEvictable
in class IN
protected boolean childrenAreEvictable()
boolean entryZeroKeyComparesLow()
entryZeroKeyComparesLow
in class IN
public void setKnownDeleted(int index)
setKnownDeleted
in class IN
index
- indicates target entrypublic void setKnownDeletedLeaveTarget(int index)
index
- indicates target entrypublic void clearKnownDeleted(int index)
clearKnownDeleted
in class IN
index
- indicates target entrypublic static long computeOverhead(DbConfigManager configManager) throws DatabaseException
DatabaseException
protected long getMemoryOverhead(MemoryBudget mb)
getMemoryOverhead
in class IN
public Set getCursorSet()
public void addCursor(CursorImpl cursor)
cursor
- Cursor to register.public void removeCursor(CursorImpl cursor)
cursor
- Cursor to unregister.public int nCursors()
BIN getCursorBIN(CursorImpl cursor)
int getCursorIndex(CursorImpl cursor)
void setCursorBIN(CursorImpl cursor, BIN bin)
void setCursorIndex(CursorImpl cursor, int index)
void splitSpecial(IN parent, int parentIndex, int maxEntriesPerNode, Key key, boolean leftSide) throws DatabaseException
splitSpecial
in class IN
DatabaseException
void adjustCursors(IN newSibling, int newSiblingLow, int newSiblingHigh)
adjustCursors
in class IN
newSibling
- - the newSibling into which "this" has been split.public void verifyCursors()
void adjustCursorsForInsert(int insertIndex)
adjustCursorsForInsert
in class IN
insertIndex
- - The index of the new entry.void adjustCursorsForMutation(int binIndex, DBIN dupBin, int dupBinIndex, CursorImpl excludeCursor)
binIndex
- - The index of the DIN (previously LN) entry in the BIN.dupBin
- - The DBIN into which the LN entry was moved.dupBinIndex
- - The index of the moved LN entry in the DBIN.excludeCursor
- - The cursor being used for insertion and that
should not be updated.public boolean compress(BINReference binRef) throws DatabaseException
compress
in class IN
binRef
- is used to determine the set of keys to be checked for
deletedness, or is null to check all keys.
DatabaseException
public long evictLNs() throws DatabaseException
DatabaseException
boolean validateSubtreeBeforeDelete(int index) throws DatabaseException
validateSubtreeBeforeDelete
in class IN
DatabaseException
boolean isValidForDelete() throws DatabaseException
isValidForDelete
in class IN
DatabaseException
void accumulateStats(TreeWalkerStatsAccumulator acc)
accumulateStats
in class IN
public Comparator getKeyComparator()
getKeyComparator
in class IN
public String beginTag()
beginTag
in class IN
public String endTag()
endTag
in class IN
public LogEntryType getLogType()
LoggableObject
getLogType
in interface LoggableObject
getLogType
in class IN
LoggableObject.getLogType()
public String shortClassName()
shortClassName
in class IN
protected long logInternal(LogManager logManager, boolean allowDeltas, boolean isProvisional) throws DatabaseException
logInternal
in class IN
DatabaseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |