ACCUMULATED_LIMIT, BIN_LEVEL, databaseImpl, DBMAP_LEVEL, EXACT_MATCH, INSERT_SUCCESS, latch, LEVEL_MASK, MAIN_LEVEL, MAX_LEVEL, MAY_EVICT_LNS, MAY_EVICT_NODE, MAY_NOT_EVICT, MIN_LEVELNULL_NODE_ID| Constructor and Description |
|---|
BIN() |
BIN(DatabaseImpl db,
byte[] identifierKey,
int maxEntriesPerNode,
int level) |
BIN(SizeofMarker marker)
For Sizeof, set all array fields to null, since they are not part of the
fixed overhead.
|
| 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.
|
void |
afterLog(LogManager logManager,
INLogItem item,
INLogContext context)
Overrides the IN method to account for deltas.
|
void |
beforeLog(LogManager logManager,
INLogItem item,
INLogContext context)
Overrides the IN method to account for deltas.
|
java.lang.String |
beginTag() |
(package private) void |
clearEntry(int idx)
Overridden to account for VLSNCache entries.
|
void |
clearKnownDeleted(int index)
Clear the known deleted flag.
|
boolean |
compress(LocalUtilizationTracker localTracker)
Compress this BIN by removing any entries that are deleted.
|
long |
computeMemorySize()
Adds VLSNCache size to computed memory size.
|
(package private) void |
copyEntries(int from,
int to,
int n)
Overridden to account for VLSNCache entries.
|
(package private) void |
copyEntry(int idx,
IN from,
int fromIdx)
Overridden to account for VLSNCache entries.
|
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.
|
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.
|
Node |
fetchTarget(int idx)
We require exclusive latches on a BIN, so this method does not need to
declare that it throws RelatchRequiredException.
|
(package private) int |
getChildEvictionType()
Note that the IN may or may not be latched when this method is called.
|
java.util.Set<CursorImpl> |
getCursorSet() |
protected long |
getFixedMemoryOverhead() |
long |
getLastDeltaVersion()
Overrides the IN method to account for deltas.
|
long |
getLastLoggedVersion()
Overrides the IN method to account for deltas.
|
LogEntryType |
getLogType()
Get the log type of this node.
|
long |
getTreeAdminMemorySize()
Returns the treeAdmin memory in objects referenced by this BIN.
|
long |
getVLSN(int idx,
boolean allowFetch)
Returns the VLSN.
|
VLSNCache |
getVLSNCache()
For unit testing.
|
(package private) boolean |
hasPinnedChildren()
Note that the IN may or may not be latched when this method is called.
|
void |
incEvictStats(Evictor.EvictionSource source)
We categorize eviction stats by the type of IN, so IN subclasses
update different stats.
|
void |
incFetchStats(EnvironmentImpl envImpl,
boolean isMiss)
We categorize fetch stats by the type of node, so node subclasses
update different stats.
|
(package private) boolean |
isAlwaysLatchedExclusively() |
boolean |
isBIN() |
boolean |
isCompressible() |
protected 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 |
queueSlotDeletion()
This method is called whenever a deleted slot is observed (when the
slot's PendingDeleted or KnownDeleted flag is set), to ensure that the
slot is compressed away.
|
void |
removeCursor(CursorImpl cursor)
Unregister a cursor with this bin.
|
void |
setKnownDeleted(int index)
Mark this entry as deleted, using the delete flag.
|
void |
setKnownDeletedClearAll(int index) |
(package private) void |
setLastLoggedLsn(long lsn)
Overrides the IN method to account for deltas.
|
void |
setProhibitNextDelta()
If cleaned or compressed, must log full version.
|
(package private) void |
setTarget(int idx,
Node target)
Updates the VLSN cache when an LN target is evicted.
|
java.lang.String |
shortClassName() |
boolean |
shouldLogDelta()
Decide whether to log a full or partial BIN, depending on the ratio of
the delta size to full BIN size, and the number of deltas that have been
logged since the last full.
|
(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.
|
accountForDeferredWriteSubtreeRemoval, accountForSubtreeRemoval, afterLogCommon, beforeLogCommon, changeMemorySize, clearLsnCompaction, clearPendingDeleted, compactMemory, compareTo, compareToKeyPrefix, deleteEntry, deleteEntry, dumpDeletedState, dumpKeys, dumpLog, dumpLogAdditional, dumpString, equals, fetchTargetWithExclusiveLatch, findEntry, findEntry, findParent, getBudgetedMemorySize, getCompactMaxKeyLength, getDatabase, getDatabaseId, getDirty, getEntryLsnByteArray, getEntryLsnLongArray, getEvictionType, getGeneration, getGenericLogType, getIdentifierKey, getInListResident, getInMemorySize, getKey, getKeyComparator, getKeyPrefix, getKeyVals, getLastFullVersion, getLatchQueueLength, getLatchString, getLevel, getLogSize, getLsn, getMaxEntries, getMigrate, getNEntries, getNodeId, getRecalcToggle, getState, getTarget, getTargets, hashCode, hasResidentChildren, init, initEntryLsn, initMemorySize, insertEntry, insertEntry1, isDbRoot, isDirty, isEntryKnownDeleted, isEntryPendingDeleted, isEvictable, isIN, isKeyInBounds, isLatchOwnerForRead, isLatchOwnerForWrite, isRoot, isStateKnownDeleted, isStatePendingDeleted, latch, latch, latchNoWait, latchNoWait, latchShared, latchShared, log, log, log, logicalEquals, makeFetchErrorMsg, needsSplitting, optionalLog, optionalLogProvisional, postFetchInit, postRecoveryInit, prepareForSlotReuse, printMemorySize, readFromLog, rebuildINList, recalcKeyPrefix, releaseLatch, releaseLatchIfOwner, resetAndGetMemorySize, setDatabase, setDirty, setGeneration, setGeneration, setIdentifierKey, setInListResident, setIsRoot, setKeyPrefix, setLastFullLsn, setLsnElement, setMigrate, setNodeId, setPendingDeleted, setRecalcToggle, shouldUpdateLsn, split, splitInternal, toString, trackProvisionalObsolete, updateEntry, updateEntry, updateEntry, updateMemorySize, updateMemorySize, updateNode, updateNode, updateNode, verify, verifyKeyPrefix, verifyMemorySize, writeToLogcontainsDuplicates, dump, getMemorySizeIncludedByParent, getTransactionId, getType, isLNclone, finalize, getClass, notify, notifyAll, wait, wait, waitdumpLog, getLogSize, getTransactionId, logicalEquals, readFromLog, writeToLogpublic BIN()
public BIN(DatabaseImpl db, byte[] identifierKey, int maxEntriesPerNode, int level)
public BIN(SizeofMarker marker)
public long getVLSN(int idx,
boolean allowFetch)
public VLSNCache getVLSNCache()
void setTarget(int idx,
Node target)
void copyEntry(int idx,
IN from,
int fromIdx)
void copyEntries(int from,
int to,
int n)
copyEntries in class INvoid clearEntry(int idx)
clearEntry in class INpublic long computeMemorySize()
computeMemorySize in class INpublic BINReference createReference()
protected IN createNewInstance(byte[] identifierKey, int maxEntries, int level)
createNewInstance in class INboolean isAlwaysLatchedExclusively()
isAlwaysLatchedExclusively in class INvoid setLastLoggedLsn(long lsn)
setLastLoggedLsn in class INpublic long getLastLoggedVersion()
getLastLoggedVersion in class INpublic long getLastDeltaVersion()
getLastDeltaVersion in class INpublic void setProhibitNextDelta()
setProhibitNextDelta in class INprotected boolean 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 setKnownDeletedClearAll(int index)
public void clearKnownDeleted(int index)
clearKnownDeleted in class INindex - indicates target entryprotected long getFixedMemoryOverhead()
getFixedMemoryOverhead 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()
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.public boolean compress(LocalUtilizationTracker localTracker) throws DatabaseException
localTracker - is used only for temporary DBs, and may be specified
to consolidate multiple tracking operations. If null, the tracking is
performed immediately in this method.DatabaseExceptionpublic void queueSlotDeletion()
public boolean isCompressible()
isCompressible in class Nodepublic long evictLNs()
throws DatabaseException
DatabaseExceptionpublic void evictLN(int index)
throws DatabaseException
DatabaseExceptionboolean validateSubtreeBeforeDelete(int index)
validateSubtreeBeforeDelete in class INboolean isValidForDelete()
throws DatabaseException
isValidForDelete in class INDatabaseExceptionvoid accumulateStats(TreeWalkerStatsAccumulator acc)
accumulateStats in class INpublic void logDirtyChildren()
throws DatabaseException
INlogDirtyChildren in class INDatabaseExceptionIN.logDirtyChildren()public void incEvictStats(Evictor.EvictionSource source)
INincEvictStats in class ININ.incEvictStats(com.sleepycat.je.evictor.Evictor.EvictionSource)public void incFetchStats(EnvironmentImpl envImpl, boolean isMiss)
NodeincFetchStats in class INNode.incFetchStats(com.sleepycat.je.dbi.EnvironmentImpl, boolean)public LogEntryType getLogType()
INgetLogType in class ININ.getLogType()public java.lang.String shortClassName()
shortClassName in class INpublic void beforeLog(LogManager logManager, INLogItem item, INLogContext context)
public void afterLog(LogManager logManager, INLogItem item, INLogContext context)
public boolean shouldLogDelta()
public Node fetchTarget(int idx) throws DatabaseException
fetchTarget in class INDatabaseExceptionCopyright (c) 2004-2012 Oracle. All rights reserved.