| java.lang.Object com.sleepycat.je.tree.Node com.sleepycat.je.tree.IN com.sleepycat.je.tree.DIN
DIN | final public class DIN extends IN (Code) | | An DIN represents an Duplicate Internal Node in the JE tree.
|
Constructor Summary | |
public | DIN() Create an empty DIN, with no node id, to be filled in from the log. | public | DIN(DatabaseImpl db, byte[] identifierKey, int capacity, byte[] dupKey, ChildReference dupCountLNRef, int level) Create a new DIN. |
Method Summary | |
void | accumulateStats(TreeWalkerStatsAccumulator acc) | public String | beginTag() | protected long | computeMemorySize() Count up the memory usage attributable to this node alone. | public static long | computeOverhead(DbConfigManager configManager) | public boolean | containsDuplicates() | protected IN | createNewInstance(byte[] identifierKey, int maxEntries, int level) Create a new DIN. | protected void | dumpLogAdditional(StringBuffer sb) | public String | dumpString(int nSpaces, boolean dumpTags) | public String | endTag() | protected int | generateLevel(DatabaseId dbId, int newLevel) | public byte[] | getChildKey(IN child) Get the key (dupe or identifier) in child that is used to locate
it in 'this' node. | public DupCountLN | getDupCountLN() | public ChildReference | getDupCountLNRef() | public byte[] | getDupKey() Return the key for this duplicate set. | public byte[] | getDupTreeKey() Return the key for navigating through the duplicate tree. | final public Comparator | getKeyComparator() Return the comparator function to be used for DINs. | public int | getLogSize() | public LogEntryType | getLogType() | public byte[] | getMainTreeKey() Return the key for navigating through the main tree. | protected long | getMemoryOverhead(MemoryBudget mb) | public void | incrementDuplicateCount(LockResult lockResult, byte[] key, Locker locker, boolean increment) Increment or decrement the DupCountLN, log the updated LN, and update
the lock result. | boolean | isAlwaysLatchedExclusively() | public boolean | isDbRoot() | protected long | logInternal(LogManager logManager, boolean allowDeltas, boolean isProvisional, boolean proactiveMigration, boolean backgroundIO, IN parent) Handles lazy migration of DupCountLNs prior to logging a DIN. | boolean | matchLNByNodeId(TreeLocation location, long nodeId) | public void | readFromLog(ByteBuffer itemBuffer, byte entryTypeVersion) | public byte[] | selectKey(byte[] mainTreeKey, byte[] dupTreeKey) | void | setDupCountLN(ChildReference dupCountLNRef) Assign the Dup Count LN. | public String | shortClassName() | public String | toString() | public void | updateDupCountLN(Node target) Assign the Dup Count LN node. | public void | updateDupCountLNRef(long newLsn) Update dup count LSN. | public void | updateDupCountLNRefAndNullTarget(long newLsn) Update Dup Count LN. | public void | writeToLog(ByteBuffer logBuffer) |
DIN | public DIN()(Code) | | Create an empty DIN, with no node id, to be filled in from the log.
|
computeMemorySize | protected long computeMemorySize()(Code) | | Count up the memory usage attributable to this node alone. LNs children
are counted by their BIN/DIN parents, but INs are not counted by
their parents because they are resident on the IN list.
|
containsDuplicates | public boolean containsDuplicates()(Code) | | true if this node is a duplicate-bearing node type, falseif otherwise. |
createNewInstance | protected IN createNewInstance(byte[] identifierKey, int maxEntries, int level)(Code) | | Create a new DIN. Need this because we can't call newInstance()
without getting a 0 node.
|
dumpLogAdditional | protected void dumpLogAdditional(StringBuffer sb)(Code) | | DINS need to dump their dup key
|
dumpString | public String dumpString(int nSpaces, boolean dumpTags)(Code) | | For unit test support:
a string that dumps information about this DIN, without |
getChildKey | public byte[] getChildKey(IN child) throws DatabaseException(Code) | | Get the key (dupe or identifier) in child that is used to locate
it in 'this' node.
|
getDupKey | public byte[] getDupKey()(Code) | | Return the key for this duplicate set.
|
getDupTreeKey | public byte[] getDupTreeKey()(Code) | | Return the key for navigating through the duplicate tree.
|
getKeyComparator | final public Comparator getKeyComparator()(Code) | | Return the comparator function to be used for DINs. This is
the user defined duplicate comparison function, if defined.
|
getMainTreeKey | public byte[] getMainTreeKey()(Code) | | Return the key for navigating through the main tree.
|
incrementDuplicateCount | public void incrementDuplicateCount(LockResult lockResult, byte[] key, Locker locker, boolean increment) throws DatabaseException(Code) | | Increment or decrement the DupCountLN, log the updated LN, and update
the lock result.
Preconditions: This DIN is latched and the DupCountLN is write locked.
Postconditions: Same as preconditions.
|
isAlwaysLatchedExclusively | boolean isAlwaysLatchedExclusively()(Code) | | |
isDbRoot | public boolean isDbRoot()(Code) | | |
logInternal | protected long logInternal(LogManager logManager, boolean allowDeltas, boolean isProvisional, boolean proactiveMigration, boolean backgroundIO, IN parent) throws DatabaseException(Code) | | Handles lazy migration of DupCountLNs prior to logging a DIN. See
BIN.logInternal for more information.
|
selectKey | public byte[] selectKey(byte[] mainTreeKey, byte[] dupTreeKey)(Code) | | |
updateDupCountLN | public void updateDupCountLN(Node target)(Code) | | Assign the Dup Count LN node. Does not dirty the DIN.
|
updateDupCountLNRef | public void updateDupCountLNRef(long newLsn)(Code) | | Update dup count LSN.
|
updateDupCountLNRefAndNullTarget | public void updateDupCountLNRefAndNullTarget(long newLsn)(Code) | | Update Dup Count LN.
|
Methods inherited from com.sleepycat.je.tree.IN | void accountForSubtreeRemoval(INList inList, UtilizationTracker tracker) throws DatabaseException(Code)(Java Doc) void accumulateStats(TreeWalkerStatsAccumulator acc)(Code)(Java Doc) void adjustCursors(IN newSibling, int newSiblingLow, int newSiblingHigh)(Code)(Java Doc) void adjustCursorsForInsert(int insertIndex)(Code)(Java Doc) public String beginTag()(Code)(Java Doc) protected boolean canBeAncestor(boolean targetContainsDuplicates)(Code)(Java Doc) void clearKnownDeleted(int idx)(Code)(Java Doc) public void clearPendingDeleted(int idx)(Code)(Java Doc) public int compareTo(Object o)(Code)(Java Doc) public boolean compress(BINReference binRef, boolean canFetch, UtilizationTracker tracker) throws DatabaseException(Code)(Java Doc) protected static long computeArraysOverhead(DbConfigManager configManager) throws DatabaseException(Code)(Java Doc) protected long computeMemorySize()(Code)(Java Doc) public static long computeOverhead(DbConfigManager configManager) throws DatabaseException(Code)(Java Doc) protected IN createNewInstance(byte[] identifierKey, int maxEntries, int level)(Code)(Java Doc) boolean deleteEntry(byte[] key, boolean maybeValidate) throws DatabaseException(Code)(Java Doc) public boolean deleteEntry(int index, boolean maybeValidate) throws DatabaseException(Code)(Java Doc) protected void descendOnParentSearch(SearchResult result, boolean targetContainsDuplicates, boolean targetIsRoot, long targetNodeId, Node child, boolean requireExactMatch) throws DatabaseException(Code)(Java Doc) static void dumpDeletedState(StringBuffer sb, byte state)(Code)(Java Doc) void dumpKeys() throws DatabaseException(Code)(Java Doc) public void dumpLog(StringBuffer sb, boolean verbose)(Code)(Java Doc) protected void dumpLogAdditional(StringBuffer sb)(Code)(Java Doc) public String dumpString(int nSpaces, boolean dumpTags)(Code)(Java Doc) public String endTag()(Code)(Java Doc) boolean entryZeroKeyComparesLow()(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) public Node fetchTarget(int idx) throws DatabaseException(Code)(Java Doc) public int findEntry(byte[] key, boolean indicateIfDuplicate, boolean exact)(Code)(Java Doc) void findParent(Tree.SearchType searchType, long targetNodeId, boolean targetContainsDuplicates, boolean targetIsRoot, byte[] targetMainTreeKey, byte[] targetDupTreeKey, SearchResult result, boolean requireExactMatch, boolean updateGeneration, int targetLevel, List trackingList, boolean doFetch) throws DatabaseException(Code)(Java Doc) void flushProvisionalObsolete(LogManager logManager) throws DatabaseException(Code)(Java Doc) protected int generateLevel(DatabaseId dbId, int newLevel)(Code)(Java Doc) public int getAccumulatedDelta()(Code)(Java Doc) int getChildEvictionType()(Code)(Java Doc) public byte[] getChildKey(IN child) throws DatabaseException(Code)(Java Doc) public DatabaseImpl getDatabase()(Code)(Java Doc) public DatabaseId getDatabaseId()(Code)(Java Doc) public boolean getDirty()(Code)(Java Doc) public byte[] getDupKey() throws DatabaseException(Code)(Java Doc) public byte[] getDupTreeKey()(Code)(Java Doc) protected long getEntryInMemorySize(byte[] key, Node target)(Code)(Java Doc) byte[] getEntryLsnByteArray()(Code)(Java Doc) long[] getEntryLsnLongArray()(Code)(Java Doc) public int getEvictionType()(Code)(Java Doc) public long getGeneration()(Code)(Java Doc) public byte[] getIdentifierKey()(Code)(Java Doc) public long getInMemorySize()(Code)(Java Doc) public byte[] getKey(int idx)(Code)(Java Doc) public Comparator getKeyComparator()(Code)(Java Doc) public long getLastFullVersion()(Code)(Java Doc) public int getLevel()(Code)(Java Doc) public int getLogSize()(Code)(Java Doc) public LogEntryType getLogType()(Code)(Java Doc) public long getLsn(int idx)(Code)(Java Doc) public byte[] getMainTreeKey()(Code)(Java Doc) int getMaxEntries()(Code)(Java Doc) protected long getMemoryOverhead(MemoryBudget mb)(Code)(Java Doc) public boolean getMigrate(int idx)(Code)(Java Doc) public int getNEntries()(Code)(Java Doc) public byte getState(int idx)(Code)(Java Doc) public Node getTarget(int idx)(Code)(Java Doc) boolean hasPinnedChildren()(Code)(Java Doc) final boolean hasResidentChildren()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) protected void init(DatabaseImpl db, byte[] identifierKey, int initialCapacity, int level)(Code)(Java Doc) void initEntryLsn(int capacity)(Code)(Java Doc) protected void initMemorySize()(Code)(Java Doc) public boolean insertEntry(ChildReference entry) throws DatabaseException(Code)(Java Doc) public int insertEntry1(ChildReference entry) throws DatabaseException(Code)(Java Doc) boolean isAlwaysLatchedExclusively()(Code)(Java Doc) public boolean isCompressible()(Code)(Java Doc) public boolean isDbRoot()(Code)(Java Doc) boolean isDirty(int idx)(Code)(Java Doc) public boolean isEntryKnownDeleted(int idx)(Code)(Java Doc) public boolean isEntryPendingDeleted(int idx)(Code)(Java Doc) public boolean isEvictable()(Code)(Java Doc) boolean isEvictionProhibited()(Code)(Java Doc) public boolean isKeyInBounds(byte[] keyVal)(Code)(Java Doc) public boolean isLatchOwnerForRead()(Code)(Java Doc) public boolean isLatchOwnerForWrite()(Code)(Java Doc) public boolean isRoot()(Code)(Java Doc) protected boolean isSoughtNode(long nid, boolean updateGeneration) throws DatabaseException(Code)(Java Doc) static boolean isStateKnownDeleted(byte state)(Code)(Java Doc) static boolean isStatePendingDeleted(byte state)(Code)(Java Doc) boolean isValidForDelete() throws DatabaseException(Code)(Java Doc) public void latch(boolean updateGeneration) throws DatabaseException(Code)(Java Doc) public void latch() throws DatabaseException(Code)(Java Doc) public boolean latchNoWait(boolean updateGeneration) throws DatabaseException(Code)(Java Doc) public boolean latchNoWait() throws DatabaseException(Code)(Java Doc) public void latchShared(boolean updateGeneration) throws DatabaseException(Code)(Java Doc) public void latchShared() throws DatabaseException(Code)(Java Doc) public long log(LogManager logManager) throws DatabaseException(Code)(Java Doc) public long log(LogManager logManager, boolean allowDeltas, boolean isProvisional, boolean proactiveMigration, boolean backgroundIO, IN parent) throws DatabaseException(Code)(Java Doc) public void logDirtyChildren() throws DatabaseException(Code)(Java Doc) protected long logInternal(LogManager logManager, boolean allowDeltas, boolean isProvisional, boolean proactiveMigration, boolean backgroundIO, IN parent) throws DatabaseException(Code)(Java Doc) static String makeFetchErrorMsg(String msg, IN in, long lsn, byte state)(Code)(Java Doc) public boolean needsSplitting()(Code)(Java Doc) boolean notOverwritingDeferredWriteEntry(long newLsn)(Code)(Java Doc) public long optionalLog(LogManager logManager) throws DatabaseException(Code)(Java Doc) public long optionalLogProvisional(LogManager logManager, IN parent) throws DatabaseException(Code)(Java Doc) public void postFetchInit(DatabaseImpl db, long sourceLsn) throws DatabaseException(Code)(Java Doc) public void postRecoveryInit(DatabaseImpl db, long sourceLsn)(Code)(Java Doc) public void readFromLog(ByteBuffer itemBuffer, byte entryTypeVersion) throws LogException(Code)(Java Doc) void rebuildINList(INList inList) throws DatabaseException(Code)(Java Doc) public void releaseLatch() throws LatchNotHeldException(Code)(Java Doc) public void releaseLatchIfOwner() throws LatchNotHeldException(Code)(Java Doc) public byte[] selectKey(byte[] mainTreeKey, byte[] dupTreeKey)(Code)(Java Doc) public void setDatabase(DatabaseImpl db)(Code)(Java Doc) public void setDirty(boolean dirty)(Code)(Java Doc) public void setEntry(int idx, Node target, byte[] keyVal, long lsn, byte state)(Code)(Java Doc) public void setGeneration()(Code)(Java Doc) public void setGeneration(long newGeneration)(Code)(Java Doc) void setIdentifierKey(byte[] key)(Code)(Java Doc) public void setInListResident(boolean resident)(Code)(Java Doc) void setIsRoot(boolean isRoot)(Code)(Java Doc) void setKnownDeleted(int idx)(Code)(Java Doc) void setLastFullLsn(long lsn)(Code)(Java Doc) void setLsnElement(int idx, long value)(Code)(Java Doc) public void setMigrate(int idx, boolean migrate)(Code)(Java Doc) public void setPendingDeleted(int idx)(Code)(Java Doc) public void setProhibitNextDelta()(Code)(Java Doc) void setTarget(int idx, Node target)(Code)(Java Doc) public String shortClassName()(Code)(Java Doc) void split(IN parent, int childIndex, int maxEntries) throws DatabaseException(Code)(Java Doc) protected void splitInternal(IN parent, int childIndex, int maxEntries, int splitIndex) throws DatabaseException(Code)(Java Doc) void splitSpecial(IN parent, int parentIndex, int maxEntriesPerNode, byte[] key, boolean leftSide) throws DatabaseException(Code)(Java Doc) public String toString()(Code)(Java Doc) void trackProvisionalObsolete(IN child, long obsoleteLsn1, long obsoleteLsn2)(Code)(Java Doc) public void updateEntry(int idx, Node node)(Code)(Java Doc) public void updateEntry(int idx, Node node, long lsn)(Code)(Java Doc) public void updateEntry(int idx, Node node, long lsn, byte[] key)(Code)(Java Doc) public void updateEntry(int idx, long lsn)(Code)(Java Doc) public void updateEntry(int idx, long lsn, byte state)(Code)(Java Doc) public void updateEntry(int idx, long lsn, long oldLNSize, long newLNSize)(Code)(Java Doc) public void updateKeyIfChanged(int idx, byte[] newKey)(Code)(Java Doc) protected void updateMemorySize(ChildReference oldRef, ChildReference newRef)(Code)(Java Doc) protected void updateMemorySize(long oldSize, long newSize)(Code)(Java Doc) void updateMemorySize(Node oldNode, Node newNode)(Code)(Java Doc) boolean validateSubtreeBeforeDelete(int index) throws DatabaseException(Code)(Java Doc) public void verify(byte[] maxKey) throws DatabaseException(Code)(Java Doc) public boolean verifyMemorySize()(Code)(Java Doc) public void writeToLog(ByteBuffer logBuffer)(Code)(Java Doc)
|
|
|