|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sleepycat.je.tree.Node
com.sleepycat.je.tree.IN
com.sleepycat.je.tree.BIN
public class BIN
A BIN represents a Bottom Internal Node in the JE tree.
| Field Summary |
|---|
| Fields inherited from class com.sleepycat.je.tree.IN |
|---|
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 Summary | |
|---|---|
BIN()
|
|
BIN(DatabaseImpl db,
byte[] identifierKey,
int maxEntriesPerNode,
int level)
|
|
| Method Summary | |
|---|---|
void |
addCursor(CursorImpl cursor)
Register a cursor with this BIN. |
void |
afterLog(LogManager logManager,
INLogItem item,
INLogContext context)
Post-log processing. |
void |
beforeLog(LogManager logManager,
INLogItem item,
INLogContext context)
Pre-log processing. |
java.lang.String |
beginTag()
|
protected boolean |
canBeAncestor(boolean targetContainsDuplicates)
|
void |
clearKnownDeleted(int index)
Clear the known deleted flag. |
boolean |
compress(BINReference binRef,
boolean canFetch,
LocalUtilizationTracker localTracker)
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<CursorImpl> |
getCursorSet()
|
java.util.Comparator<byte[]> |
getKeyComparator()
Return the relevant user defined comparison function for this type of node. |
long |
getLastDeltaVersion()
|
LogEntryType |
getLogType()
|
protected long |
getMemoryOverhead(MemoryBudget mb)
|
long |
getTreeAdminMemorySize()
Returns the treeAdmin memory in objects referenced by this BIN. |
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. |
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. |
| Methods inherited from class com.sleepycat.je.tree.Node |
|---|
containsDuplicates, dump, getMemorySizeIncludedByParent, getNodeId, getTransactionId, getType, shortDescription |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.sleepycat.je.log.Loggable |
|---|
dumpLog, getLogSize, getTransactionId, logicalEquals, readFromLog, writeToLog |
| Constructor Detail |
|---|
public BIN()
public BIN(DatabaseImpl db,
byte[] identifierKey,
int maxEntriesPerNode,
int level)
| Method Detail |
|---|
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 INDatabaseExceptionpublic 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 INDatabaseExceptionprotected boolean canBeAncestor(boolean targetContainsDuplicates)
canBeAncestor in class INpublic void setKnownDeleted(int index)
index - indicates target entrypublic void setKnownDeletedLeaveTarget(int index)
index - indicates target entrypublic void clearKnownDeleted(int index)
index - indicates target entry
public static long computeOverhead(DbConfigManager configManager)
throws DatabaseException
DatabaseExceptionprotected long getMemoryOverhead(MemoryBudget mb)
getMemoryOverhead 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()
public void verifyCursors()
public boolean compress(BINReference binRef,
boolean canFetch,
LocalUtilizationTracker localTracker)
throws DatabaseException
compress in class INbinRef - 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.
DatabaseExceptionpublic boolean isCompressible()
isCompressible in class IN
public long evictLNs()
throws DatabaseException
DatabaseException
public void evictLN(int index)
throws DatabaseException
DatabaseExceptionpublic java.util.Comparator<byte[]> getKeyComparator()
getKeyComparator in class INpublic java.lang.String beginTag()
beginTag in class INpublic java.lang.String endTag()
endTag in class IN
public void logDirtyChildren()
throws DatabaseException
IN
logDirtyChildren in class INDatabaseExceptionIN.logDirtyChildren();public LogEntryType getLogType()
getLogType in class INNode.getLogType()public java.lang.String shortClassName()
shortClassName in class IN
public void beforeLog(LogManager logManager,
INLogItem item,
INLogContext context)
throws DatabaseException
IN
beforeLog in class INDatabaseException
public void afterLog(LogManager logManager,
INLogItem item,
INLogContext context)
throws DatabaseException
IN
afterLog in class INDatabaseException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||