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 and Description |
|---|
BIN() |
BIN(DatabaseImpl db,
byte[] identifierKey,
int maxEntriesPerNode,
int level) |
| Modifier and Type | Method and Description |
|---|---|
(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.
|
void |
afterLog(LogManager logManager,
INLogItem item,
INLogContext context)
Post-log processing.
|
void |
beforeLog(LogManager logManager,
INLogItem item,
INLogContext context)
Pre-log processing.
|
java.lang.String |
beginTag() |
protected boolean |
canBeAncestor(boolean targetContainsDuplicates) |
void |
clearKnownDeleted(int index)
Clear the known deleted flag.
|
boolean |
compress(BINReference binRef,
boolean canFetch,
LocalUtilizationTracker localTracker)
Compress this BIN by removing any entries that are deleted.
|
static long |
computeOverhead(DbConfigManager configManager) |
protected IN |
createNewInstance(byte[] 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) |
java.lang.String |
endTag() |
(package private) boolean |
entryZeroKeyComparesLow()
Indicates whether entry 0's key is "special" in that it always compares
less than any other key.
|
void |
evictLN(int index)
Evict a single LN if allowed and adjust the memory budget.
|
long |
evictLNs()
Reduce memory consumption by evicting all LN targets.
|
(package private) LogEntryType |
getBINDeltaType() |
(package private) int |
getChildEvictionType()
Note that the IN may or may not be latched when this method is called.
|
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) |
java.util.Set<CursorImpl> |
getCursorSet() |
java.util.Comparator<byte[]> |
getKeyComparator()
Return the relevant user defined comparison function for this type of
node.
|
long |
getLastDeltaVersion() |
LogEntryType |
getLogType() |
protected long |
getMemoryOverhead(MemoryBudget mb) |
long |
getTreeAdminMemorySize()
Returns the treeAdmin memory in objects referenced by this BIN.
|
(package private) boolean |
hasPinnedChildren()
Note that the IN may or may not be latched when this method is called.
|
(package private) boolean |
isAlwaysLatchedExclusively() |
boolean |
isCompressible() |
(package private) boolean |
isEvictionProhibited()
Note that the IN may or may not be latched when this method is called.
|
(package private) boolean |
isValidForDelete()
Check if this node fits the qualifications for being part of a deletable
subtree.
|
void |
logDirtyChildren()
When splits and checkpoints intermingle in a deferred write databases,
a checkpoint target may appear which has a valid target but a null LSN.
|
int |
nCursors() |
void |
removeCursor(CursorImpl cursor)
Unregister a cursor with this bin.
|
(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.
|
void |
setProhibitNextDelta()
If cleaned or compressed, must log full version.
|
java.lang.String |
shortClassName() |
(package private) void |
splitSpecial(IN parent,
int parentIndex,
int maxEntriesPerNode,
byte[] key,
boolean leftSide,
CacheMode cacheMode)
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.
|
accountForSubtreeRemoval, clearLsn, clearPendingDeleted, compareTo, compareToKeyPrefix, computeArraysOverhead, computeMemorySize, deleteEntry, deleteEntry, dumpDeletedState, dumpKeys, dumpLog, dumpLogAdditional, dumpString, equals, fetchTarget, findEntry, findParent, flushProvisionalObsolete, generateLevel, getBudgetedMemorySize, getDatabase, getDatabaseId, getDirty, getDupKey, getDupTreeKey, getEntryInMemorySize, getEntryLsnByteArray, getEntryLsnLongArray, getEvictionType, getGeneration, getIdentifierKey, getInListResident, getInMemorySize, getKey, getKeyPrefix, getLastFullVersion, getLevel, getLogSize, getLsn, getMainTreeKey, getMaxEntries, getMigrate, getNEntries, getRecalcToggle, getState, getTarget, hashCode, hasResidentChildren, init, initEntryLsn, initMemorySize, insertEntry, insertEntry1, isDbRoot, isDirty, isEntryKnownDeleted, isEntryPendingDeleted, isEvictable, isKeyInBounds, isLatchOwnerForRead, isLatchOwnerForWrite, isRoot, isSoughtNode, isStateKnownDeleted, isStatePendingDeleted, latch, latch, latchNoWait, latchNoWait, latchShared, latchShared, log, log, log, logicalEquals, makeFetchErrorMsg, needsSplitting, notOverwritingDeferredWriteEntry, optionalLog, optionalLogProvisional, postFetchInit, postRecoveryInit, readFromLog, rebuildINList, releaseLatch, releaseLatchIfOwner, selectKey, setDatabase, setDirty, setEntry, setGeneration, setGeneration, setIdentifierKey, setInListResident, setIsRoot, setKeyPrefix, setLastFullLsn, setLsnElement, setMigrate, setPendingDeleted, setRecalcToggle, setTarget, split, splitInternal, toString, trackProvisionalObsolete, updateEntry, updateEntry, updateEntry, updateMemorySize, updateMemorySize, updateMemorySize, updateNode, updateNode, updateNode, verify, verifyKeyPrefix, verifyMemorySize, writeToLogcontainsDuplicates, dump, getMemorySizeIncludedByParent, getNodeId, getTransactionId, getType, matchLNByNodeId, setNodeId, shortDescriptionclone, finalize, getClass, notify, notifyAll, wait, wait, waitdumpLog, getLogSize, getTransactionId, logicalEquals, readFromLog, writeToLogpublic BIN()
public BIN(DatabaseImpl db, byte[] identifierKey, int maxEntriesPerNode, int level)
public BINReference createReference()
protected IN createNewInstance(byte[] identifierKey, int maxEntries, int level)
createNewInstance in class INboolean isAlwaysLatchedExclusively()
isAlwaysLatchedExclusively in class INpublic byte[] getChildKey(IN child) throws DatabaseException
getChildKey in class INDatabaseExceptionLogEntryType getBINDeltaType()
public long getLastDeltaVersion()
public void setProhibitNextDelta()
setProhibitNextDelta in class INprotected void descendOnParentSearch(SearchResult result, boolean targetContainsDuplicates, boolean targetIsRoot, long targetNodeId, Node child, boolean requireExactMatch) throws DatabaseException
descendOnParentSearch in class INDatabaseExceptionprotected boolean canBeAncestor(boolean targetContainsDuplicates)
canBeAncestor in class INboolean isEvictionProhibited()
isEvictionProhibited in class INboolean hasPinnedChildren()
hasPinnedChildren in class INint getChildEvictionType()
getChildEvictionType in class INboolean entryZeroKeyComparesLow()
entryZeroKeyComparesLow in class INpublic void setKnownDeleted(int index)
setKnownDeleted in class INindex - indicates target entrypublic void setKnownDeletedLeaveTarget(int index)
index - indicates target entrypublic void clearKnownDeleted(int index)
clearKnownDeleted in class INindex - indicates target entrypublic static long computeOverhead(DbConfigManager configManager) throws DatabaseException
DatabaseExceptionprotected long getMemoryOverhead(MemoryBudget mb)
getMemoryOverhead in class INpublic long getTreeAdminMemorySize()
getTreeAdminMemorySize in class INpublic java.util.Set<CursorImpl> 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)
BIN getCursorBINToBeRemoved(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, byte[] key, boolean leftSide, CacheMode cacheMode) throws DatabaseException
splitSpecial in class INDatabaseExceptionvoid adjustCursors(IN newSibling, int newSiblingLow, int newSiblingHigh)
adjustCursors in class INnewSibling - - the newSibling into which "this" has been split.newSiblingLow, - newSiblingHigh - the low and high entry of
"this" that were moved into newSibling.public void verifyCursors()
void adjustCursorsForInsert(int insertIndex)
adjustCursorsForInsert in class INinsertIndex - - 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, boolean canFetch, LocalUtilizationTracker localTracker) throws DatabaseException
compress in class INbinRef - is used to determine the set of keys to be checked for
deletedness, or is null to check all keys.canFetch - if false, don't fetch any non-resident children. We
don't want some callers of compress, such as the evictor, to fault in
other nodes.DatabaseExceptionpublic boolean isCompressible()
isCompressible in class INpublic long evictLNs()
throws DatabaseException
DatabaseExceptionpublic void evictLN(int index)
throws DatabaseException
DatabaseExceptionboolean validateSubtreeBeforeDelete(int index)
throws DatabaseException
validateSubtreeBeforeDelete in class INDatabaseExceptionboolean isValidForDelete()
throws DatabaseException
isValidForDelete in class INDatabaseExceptionvoid accumulateStats(TreeWalkerStatsAccumulator acc)
accumulateStats in class INpublic java.util.Comparator<byte[]> getKeyComparator()
getKeyComparator in class INpublic void logDirtyChildren()
throws DatabaseException
INlogDirtyChildren in class INDatabaseExceptionIN.logDirtyChildren();public LogEntryType getLogType()
getLogType in class INNode.getLogType()public java.lang.String shortClassName()
shortClassName in class INpublic void beforeLog(LogManager logManager, INLogItem item, INLogContext context) throws DatabaseException
INbeforeLog in class INDatabaseExceptionpublic void afterLog(LogManager logManager, INLogItem item, INLogContext context) throws DatabaseException
INafterLog in class INDatabaseExceptionCopyright (c) 2004,2008 Oracle. All rights reserved.