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 |
|---|
DIN()
Create an empty DIN, with no node id, to be filled in from the log.
|
DIN(DatabaseImpl db,
byte[] identifierKey,
int capacity,
byte[] dupKey,
ChildReference dupCountLNRef,
int level)
Create a new DIN.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
accumulateStats(TreeWalkerStatsAccumulator acc) |
void |
beforeLog(LogManager logManager,
INLogItem item,
INLogContext context)
Handles lazy migration of DupCountLNs prior to logging a DIN.
|
java.lang.String |
beginTag() |
protected long |
computeMemorySize()
Count up the memory usage attributable to this node alone.
|
static long |
computeOverhead(DbConfigManager configManager) |
boolean |
containsDuplicates() |
protected IN |
createNewInstance(byte[] identifierKey,
int maxEntries,
int level)
Create a new DIN.
|
protected void |
dumpLogAdditional(java.lang.StringBuffer sb)
DINS need to dump their dup key
|
java.lang.String |
dumpString(int nSpaces,
boolean dumpTags)
For unit test support:
|
java.lang.String |
endTag() |
protected int |
generateLevel(DatabaseId dbId,
int newLevel) |
byte[] |
getChildKey(IN child)
Get the key (dupe or identifier) in child that is used to locate
it in 'this' node.
|
DupCountLN |
getDupCountLN() |
ChildReference |
getDupCountLNRef() |
byte[] |
getDupKey()
Return the key for this duplicate set.
|
byte[] |
getDupTreeKey()
Return the key for navigating through the duplicate tree.
|
java.util.Comparator<byte[]> |
getKeyComparator()
Return the comparator function to be used for DINs.
|
int |
getLogSize() |
LogEntryType |
getLogType() |
byte[] |
getMainTreeKey()
Return the key for navigating through the main tree.
|
protected long |
getMemoryOverhead(MemoryBudget mb) |
void |
incrementDuplicateCount(LockResult lockResult,
byte[] key,
Locker locker,
boolean increment)
Increment or decrement the DupCountLN, log the updated LN, and update
the lock result.
|
(package private) boolean |
isAlwaysLatchedExclusively() |
boolean |
isDbRoot() |
(package private) boolean |
matchLNByNodeId(TreeLocation location,
long nodeId,
CacheMode cacheMode) |
void |
readFromLog(java.nio.ByteBuffer itemBuffer,
byte entryVersion)
Initialize this object from the data in itemBuf.
|
byte[] |
selectKey(byte[] mainTreeKey,
byte[] dupTreeKey) |
(package private) void |
setDupCountLN(ChildReference dupCountLNRef)
Assign the Dup Count LN.
|
java.lang.String |
shortClassName() |
java.lang.String |
toString()
Default toString method at the root of the tree.
|
void |
updateDupCountLN(Node target)
Assign the Dup Count LN node.
|
void |
updateDupCountLNRef(long newLsn)
Update dup count LSN.
|
void |
updateDupCountLNRefAndNullTarget(long newLsn)
Update Dup Count LN.
|
void |
writeToLog(java.nio.ByteBuffer logBuffer)
Serialize this object into the buffer.
|
accountForSubtreeRemoval, adjustCursors, adjustCursorsForInsert, afterLog, canBeAncestor, clearKnownDeleted, clearLsn, clearPendingDeleted, compareTo, compareToKeyPrefix, compress, computeArraysOverhead, deleteEntry, deleteEntry, descendOnParentSearch, dumpDeletedState, dumpKeys, dumpLog, entryZeroKeyComparesLow, equals, fetchTarget, findEntry, findParent, flushProvisionalObsolete, getBudgetedMemorySize, getChildEvictionType, getDatabase, getDatabaseId, getDirty, getEntryInMemorySize, getEntryLsnByteArray, getEntryLsnLongArray, getEvictionType, getGeneration, getIdentifierKey, getInListResident, getInMemorySize, getKey, getKeyPrefix, getLastFullVersion, getLevel, getLsn, getMaxEntries, getMigrate, getNEntries, getRecalcToggle, getState, getTarget, getTreeAdminMemorySize, hashCode, hasPinnedChildren, hasResidentChildren, init, initEntryLsn, initMemorySize, insertEntry, insertEntry1, isCompressible, isDirty, isEntryKnownDeleted, isEntryPendingDeleted, isEvictable, isEvictionProhibited, isKeyInBounds, isLatchOwnerForRead, isLatchOwnerForWrite, isRoot, isSoughtNode, isStateKnownDeleted, isStatePendingDeleted, isValidForDelete, latch, latch, latchNoWait, latchNoWait, latchShared, latchShared, log, log, log, logDirtyChildren, logicalEquals, makeFetchErrorMsg, needsSplitting, notOverwritingDeferredWriteEntry, optionalLog, optionalLogProvisional, postFetchInit, postRecoveryInit, rebuildINList, releaseLatch, releaseLatchIfOwner, setDatabase, setDirty, setEntry, setGeneration, setGeneration, setIdentifierKey, setInListResident, setIsRoot, setKeyPrefix, setKnownDeleted, setLastFullLsn, setLsnElement, setMigrate, setPendingDeleted, setProhibitNextDelta, setRecalcToggle, setTarget, split, splitInternal, splitSpecial, trackProvisionalObsolete, updateEntry, updateEntry, updateEntry, updateMemorySize, updateMemorySize, updateMemorySize, updateNode, updateNode, updateNode, validateSubtreeBeforeDelete, verify, verifyKeyPrefix, verifyMemorySizedump, getMemorySizeIncludedByParent, getNodeId, getTransactionId, getType, setNodeId, shortDescriptionclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetTransactionIdpublic DIN()
public DIN(DatabaseImpl db, byte[] identifierKey, int capacity, byte[] dupKey, ChildReference dupCountLNRef, int level)
protected int generateLevel(DatabaseId dbId, int newLevel)
generateLevel in class INprotected IN createNewInstance(byte[] identifierKey, int maxEntries, int level)
createNewInstance in class INboolean isAlwaysLatchedExclusively()
isAlwaysLatchedExclusively in class INpublic byte[] getDupKey()
public byte[] getChildKey(IN child) throws DatabaseException
getChildKey in class INDatabaseExceptionpublic byte[] selectKey(byte[] mainTreeKey,
byte[] dupTreeKey)
public byte[] getDupTreeKey()
getDupTreeKey in class INpublic byte[] getMainTreeKey()
getMainTreeKey in class INpublic ChildReference getDupCountLNRef()
public DupCountLN getDupCountLN() throws DatabaseException
DatabaseExceptionvoid setDupCountLN(ChildReference dupCountLNRef)
public void updateDupCountLN(Node target)
public void updateDupCountLNRefAndNullTarget(long newLsn)
public void updateDupCountLNRef(long newLsn)
public boolean containsDuplicates()
containsDuplicates in class Nodepublic final java.util.Comparator<byte[]> getKeyComparator()
getKeyComparator in class INpublic void incrementDuplicateCount(LockResult lockResult, byte[] key, Locker locker, boolean increment) throws DatabaseException
DatabaseExceptionprotected long computeMemorySize()
computeMemorySize in class INpublic static long computeOverhead(DbConfigManager configManager) throws DatabaseException
DatabaseExceptionprotected long getMemoryOverhead(MemoryBudget mb)
getMemoryOverhead in class INboolean matchLNByNodeId(TreeLocation location, long nodeId, CacheMode cacheMode) throws DatabaseException
matchLNByNodeId in class NodeDatabaseExceptionvoid accumulateStats(TreeWalkerStatsAccumulator acc)
accumulateStats in class INpublic LogEntryType getLogType()
getLogType in class INNode.getLogType()public void beforeLog(LogManager logManager, INLogItem item, INLogContext context) throws DatabaseException
beforeLog in class INDatabaseExceptionpublic int getLogSize()
getLogSize in interface LoggablegetLogSize in class ININ.getLogSize()public void writeToLog(java.nio.ByteBuffer logBuffer)
LoggablewriteToLog in interface LoggablewriteToLog in class INlogBuffer - is the destination bufferIN.writeToLog(java.nio.ByteBuffer)public void readFromLog(java.nio.ByteBuffer itemBuffer,
byte entryVersion)
throws LogException
LoggablereadFromLog in interface LoggablereadFromLog in class INLogExceptionIN.readFromLog(java.nio.ByteBuffer, byte)protected void dumpLogAdditional(java.lang.StringBuffer sb)
dumpLogAdditional in class INpublic java.lang.String dumpString(int nSpaces,
boolean dumpTags)
dumpString in class INpublic java.lang.String toString()
Nodepublic java.lang.String shortClassName()
shortClassName in class INCopyright (c) 2004,2008 Oracle. All rights reserved.