class DirtyINMap
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
DirtyINMap.CkptState |
Constructor and Description |
---|
DirtyINMap(EnvironmentImpl envImpl) |
Modifier and Type | Method and Description |
---|---|
(package private) java.lang.Integer |
addIN(IN in,
boolean updateMemoryBudget)
Add a node unconditionally to the dirty map.
|
(package private) void |
beginCheckpoint(boolean flushAll,
boolean flushExtraLevel)
Must be called before starting a checkpoint, and must not be called for
Database.sync.
|
(package private) boolean |
containsNode(java.lang.Integer level,
java.lang.Long nodeId) |
(package private) boolean |
coordinateEvictionWithCheckpoint(IN target,
IN parent)
Coordinates an eviction with an in-progress checkpoint and returns
whether or not provisional logging is needed.
|
(package private) void |
flushMapLNs(long checkpointStart)
Flushes all saved dirty/temp MapLNs and clears the saved set.
|
(package private) void |
flushRoot(long checkpointStart)
Flushes the DB mapping tree root at the end of the checkpoint, if either
mapping DB is dirty and the root was not flushed previously during the
checkpoint.
|
(package private) int |
getHighestFlushLevel(DatabaseImpl db) |
(package private) java.lang.Integer |
getLowestLevelSet()
Get the lowest level currently stored in the map.
|
(package private) int |
getNumEntries() |
(package private) int |
getNumLevels() |
(package private) void |
removeLevel(java.lang.Integer level)
Removes the set corresponding to the given level.
|
(package private) Checkpointer.CheckpointReference |
removeNextNode(java.lang.Integer level) |
(package private) Checkpointer.CheckpointReference |
removeNode(java.lang.Integer level,
java.lang.Long nodeId) |
(package private) void |
reset()
Must be called after a checkpoint or Database.sync is complete.
|
(package private) void |
selectDirtyINsForCheckpoint()
Scan the INList for all dirty INs, excluding temp DB INs.
|
(package private) void |
selectDirtyINsForDbSync(DatabaseImpl dbImpl)
Scan the INList for all dirty INs for a given database.
|
DirtyINMap(EnvironmentImpl envImpl)
boolean coordinateEvictionWithCheckpoint(IN target, IN parent)
void beginCheckpoint(boolean flushAll, boolean flushExtraLevel)
void reset()
void selectDirtyINsForCheckpoint() throws DatabaseException
DatabaseException
void selectDirtyINsForDbSync(DatabaseImpl dbImpl) throws DatabaseException
DatabaseException
int getHighestFlushLevel(DatabaseImpl db)
int getNumLevels()
java.lang.Integer addIN(IN in, boolean updateMemoryBudget)
updateMemoryBudget
- if true then update the memory budget as the
map is changed; if false then addCostToMemoryBudget must be called
later.java.lang.Integer getLowestLevelSet()
void removeLevel(java.lang.Integer level)
boolean containsNode(java.lang.Integer level, java.lang.Long nodeId)
Checkpointer.CheckpointReference removeNode(java.lang.Integer level, java.lang.Long nodeId)
Checkpointer.CheckpointReference removeNextNode(java.lang.Integer level)
void flushMapLNs(long checkpointStart) throws DatabaseException
If dirty, a MapLN must be flushed at each checkpoint to record updated utilization info in the checkpoint interval. If it is a temporary DB, the MapLN must be flushed because all temp DBs must be encountered by recovery so they can be removed if they were not closed (and removed) by the user.
This method is not synchronized because it takes the Btree root latch, and we must never latch something in the Btree after synchronizing on DirtyINMap; see class comments. Special synchronization is performed for accessing internal state; see below.checkpointStart
- start LSN of the checkpoint in progress. To
reduce unnecessary logging, the MapLN is only flushed if it has not been
written since that LSN.DatabaseException
void flushRoot(long checkpointStart) throws DatabaseException
checkpointStart
- start LSN of the checkpoint in progress. To
reduce unnecessary logging, the Root is only flushed if it has not been
written since that LSN.DatabaseException
int getNumEntries()
Copyright (c) 2004-2012 Oracle. All rights reserved.