public class DbFileSummaryMap
extends java.lang.Object
Constructor and Description |
---|
DbFileSummaryMap(boolean countParentMapEntry)
Creates a map of Long file number to DbFileSummary.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.lang.Long fileNum) |
java.util.Set<java.util.Map.Entry<java.lang.Long,DbFileSummary>> |
entrySet() |
DbFileSummary |
get(java.lang.Long fileNum,
boolean adjustMemBudget,
boolean checkResurrected,
FileManager fileManager)
Returns the DbFileSummary for the given file, allocating it if
necessary.
|
long |
getMemorySize() |
void |
init(EnvironmentImpl env)
Starts memory budgeting.
|
boolean |
remove(java.lang.Long fileNum)
Removes the DbFileSummary for the given file.
|
void |
repair(EnvironmentImpl env)
Removes entries for deleted files that were created by JE 3.3.74 and
earlier.
|
int |
size() |
void |
subtractFromMemoryBudget() |
java.lang.String |
toString() |
public DbFileSummaryMap(boolean countParentMapEntry)
Always counts this object and its contained objects in the memory budget. If countParentMapEntry is true, also counts a single HashMap entry that contains this object. This option allows all memory budget adjustments for LocalUtilizationTracker to be contained in this class.
public void init(EnvironmentImpl env)
This method is separate from the constructor so that the map may be read from the log without having the EnvironmentImpl object available.
public DbFileSummary get(java.lang.Long fileNum, boolean adjustMemBudget, boolean checkResurrected, FileManager fileManager)
Must be called under the log write latch.
fileNum
- the file identifying the summary.adjustMemBudget
- see init().checkResurrected
- is true if this method should check fileNum and
return null if the file does not exist.fileManager
- is used to check for resurrected files and may be null
if checkResurrected is false.public boolean remove(java.lang.Long fileNum)
Must be called under the log write latch.
public long getMemorySize()
public void subtractFromMemoryBudget()
public java.util.Set<java.util.Map.Entry<java.lang.Long,DbFileSummary>> entrySet()
public boolean contains(java.lang.Long fileNum)
public int size()
public java.lang.String toString()
toString
in class java.lang.Object
public void repair(EnvironmentImpl env)