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.
|
java.lang.String |
beginTag() |
protected boolean |
canBeAncestor(boolean targetContainsDuplicates) |
void |
clearKnownDeleted(int index)
Clear the known deleted flag.
|
boolean |
compress(BINReference binRef,
boolean canFetch,
UtilizationTracker tracker)
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 |
getCursorSet() |
java.util.Comparator |
getKeyComparator()
Return the relevant user defined comparison function for this
type of node.
|
long |
getLastDeltaVersion() |
LogEntryType |
getLogType() |
protected long |
getMemoryOverhead(MemoryBudget mb) |
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.
|
protected long |
logInternal(LogManager logManager,
boolean allowDeltas,
boolean isProvisional,
boolean proactiveMigration,
boolean backgroundIO,
IN parent)
Decide how to log this node.
|
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.
|
clearPendingDeleted, compareTo, computeArraysOverhead, computeMemorySize, deleteEntry, dumpLog, dumpLogAdditional, dumpString, equals, fetchTarget, findEntry, generateLevel, getAccumulatedDelta, getDatabase, getDatabaseId, getDirty, getDupKey, getDupTreeKey, getEntryInMemorySize, getEvictionType, getGeneration, getIdentifierKey, getInMemorySize, getKey, getLastFullVersion, getLevel, getLogSize, getLsn, getMainTreeKey, getMigrate, getNEntries, getState, getTarget, hashCode, init, initMemorySize, insertEntry, insertEntry1, isDbRoot, isEntryKnownDeleted, isEntryPendingDeleted, isEvictable, isKeyInBounds, isLatchOwnerForRead, isLatchOwnerForWrite, isRoot, isSoughtNode, latch, latch, latchNoWait, latchNoWait, latchShared, latchShared, log, log, needsSplitting, optionalLog, optionalLogProvisional, postFetchInit, postRecoveryInit, readFromLog, releaseLatch, releaseLatchIfOwner, selectKey, setDatabase, setDirty, setEntry, setGeneration, setGeneration, setInListResident, setMigrate, setPendingDeleted, splitInternal, toString, updateEntry, updateEntry, updateEntry, updateEntry, updateEntry, updateEntry, updateKeyIfChanged, updateMemorySize, updateMemorySize, verify, verifyMemorySize, writeToLog
containsDuplicates, dump, getLastId, getMemorySizeIncludedByParent, getNextNodeId, getNodeId, getTransactionId, getType, setLastNodeId, shortDescription
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
dumpLog, getLogSize, getTransactionId, 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 java.util.Set 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, UtilizationTracker tracker) 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 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
protected long logInternal(LogManager logManager, boolean allowDeltas, boolean isProvisional, boolean proactiveMigration, boolean backgroundIO, IN parent) throws DatabaseException
logInternal
in class IN
DatabaseException