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 |
---|---|
void |
addCursor(CursorImpl cursor)
Register a cursor with this BIN.
|
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() |
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.
|
byte[] |
getChildKey(IN child)
Get the key (dupe or identifier) in child that is used to locate it in
'this' node.
|
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.
|
boolean |
isCompressible() |
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.
|
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() |
void |
verifyCursors()
For each cursor in this BIN's cursor set, ensure that the cursor is
actually referring to this BIN.
|
clearLsn, clearPendingDeleted, compareTo, computeArraysOverhead, computeMemorySize, deleteEntry, dumpLog, dumpLogAdditional, dumpString, equals, fetchTarget, findEntry, generateLevel, getBudgetedMemorySize, getDatabase, getDatabaseId, getDirty, getDupKey, getDupTreeKey, getEntryInMemorySize, getEvictionType, getGeneration, getIdentifierKey, getInListResident, getInMemorySize, getKey, getLastFullVersion, getLevel, getLogSize, getLsn, getMainTreeKey, getMigrate, getNEntries, getRecalcToggle, getState, getTarget, hashCode, init, initMemorySize, insertEntry, insertEntry1, isDbRoot, isEntryKnownDeleted, isEntryPendingDeleted, isEvictable, isKeyInBounds, isLatchOwnerForRead, isLatchOwnerForWrite, isRoot, isSoughtNode, latch, latch, latchNoWait, latchNoWait, latchShared, latchShared, log, log, log, logicalEquals, needsSplitting, optionalLog, optionalLogProvisional, postFetchInit, postRecoveryInit, readFromLog, releaseLatch, releaseLatchIfOwner, selectKey, setDatabase, setDirty, setEntry, setGeneration, setGeneration, setInListResident, setMigrate, setPendingDeleted, setRecalcToggle, splitInternal, toString, updateEntry, updateEntry, updateEntry, updateMemorySize, updateMemorySize, updateNode, updateNode, updateNode, verify, verifyMemorySize, writeToLog
containsDuplicates, dump, getMemorySizeIncludedByParent, getNodeId, getTransactionId, getType, shortDescription
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
dumpLog, getLogSize, getTransactionId, logicalEquals, readFromLog, writeToLog
public 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 IN
public byte[] getChildKey(IN child) throws DatabaseException
getChildKey
in class IN
DatabaseException
public long getLastDeltaVersion()
public void setProhibitNextDelta()
setProhibitNextDelta
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 void setKnownDeleted(int index)
index
- indicates target entrypublic void setKnownDeletedLeaveTarget(int index)
index
- indicates target entrypublic void clearKnownDeleted(int index)
index
- indicates target entrypublic static long computeOverhead(DbConfigManager configManager) throws DatabaseException
DatabaseException
protected long getMemoryOverhead(MemoryBudget mb)
getMemoryOverhead
in class IN
public long getTreeAdminMemorySize()
getTreeAdminMemorySize
in class IN
public 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()
public void verifyCursors()
public boolean compress(BINReference binRef, boolean canFetch, LocalUtilizationTracker localTracker) 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.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.DatabaseException
public boolean isCompressible()
isCompressible
in class IN
public long evictLNs() throws DatabaseException
DatabaseException
public void evictLN(int index) throws DatabaseException
DatabaseException
public java.util.Comparator<byte[]> getKeyComparator()
getKeyComparator
in class IN
public void logDirtyChildren() throws DatabaseException
IN
logDirtyChildren
in class IN
DatabaseException
IN.logDirtyChildren();
public LogEntryType getLogType()
getLogType
in class IN
Node.getLogType()
public java.lang.String shortClassName()
shortClassName
in class IN
public void beforeLog(LogManager logManager, INLogItem item, INLogContext context) throws DatabaseException
IN
beforeLog
in class IN
DatabaseException
public void afterLog(LogManager logManager, INLogItem item, INLogContext context) throws DatabaseException
IN
afterLog
in class IN
DatabaseException