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_LEVEL
NULL_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, writeToLog
containsDuplicates, dump, getMemorySizeIncludedByParent, getTransactionId, getType, isLN
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 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 IN
void clearEntry(int idx)
clearEntry
in class IN
public long computeMemorySize()
computeMemorySize
in class IN
public BINReference createReference()
protected IN createNewInstance(byte[] identifierKey, int maxEntries, int level)
createNewInstance
in class IN
boolean isAlwaysLatchedExclusively()
isAlwaysLatchedExclusively
in class IN
void setLastLoggedLsn(long lsn)
setLastLoggedLsn
in class IN
public long getLastLoggedVersion()
getLastLoggedVersion
in class IN
public long getLastDeltaVersion()
getLastDeltaVersion
in class IN
public void setProhibitNextDelta()
setProhibitNextDelta
in class IN
protected boolean isEvictionProhibited()
isEvictionProhibited
in class IN
boolean hasPinnedChildren()
hasPinnedChildren
in class IN
int getChildEvictionType()
getChildEvictionType
in class IN
boolean entryZeroKeyComparesLow()
entryZeroKeyComparesLow
in class IN
public void setKnownDeleted(int index)
setKnownDeleted
in class IN
index
- indicates target entrypublic void setKnownDeletedClearAll(int index)
public void clearKnownDeleted(int index)
clearKnownDeleted
in class IN
index
- indicates target entryprotected long getFixedMemoryOverhead()
getFixedMemoryOverhead
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()
void splitSpecial(IN parent, int parentIndex, int maxEntriesPerNode, byte[] key, boolean leftSide, CacheMode cacheMode) 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.newSiblingLow
- newSiblingHigh
- - the low and high entry of
"this" that were moved into newSibling.public void verifyCursors()
void adjustCursorsForInsert(int insertIndex)
adjustCursorsForInsert
in class IN
insertIndex
- - 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.DatabaseException
public void queueSlotDeletion()
public boolean isCompressible()
isCompressible
in class Node
public long evictLNs() throws DatabaseException
DatabaseException
public void evictLN(int index) throws DatabaseException
DatabaseException
boolean validateSubtreeBeforeDelete(int index)
validateSubtreeBeforeDelete
in class IN
boolean isValidForDelete() throws DatabaseException
isValidForDelete
in class IN
DatabaseException
void accumulateStats(TreeWalkerStatsAccumulator acc)
accumulateStats
in class IN
public void logDirtyChildren() throws DatabaseException
IN
logDirtyChildren
in class IN
DatabaseException
IN.logDirtyChildren()
public void incEvictStats(Evictor.EvictionSource source)
IN
incEvictStats
in class IN
IN.incEvictStats(com.sleepycat.je.evictor.Evictor.EvictionSource)
public void incFetchStats(EnvironmentImpl envImpl, boolean isMiss)
Node
incFetchStats
in class IN
Node.incFetchStats(com.sleepycat.je.dbi.EnvironmentImpl, boolean)
public LogEntryType getLogType()
IN
getLogType
in class IN
IN.getLogType()
public java.lang.String shortClassName()
shortClassName
in class IN
public 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 IN
DatabaseException
Copyright (c) 2004-2012 Oracle. All rights reserved.