public abstract class BaseUtilizationTracker extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
countObsoleteDb(DbFileSummaryMap dbFileSummaries,
long mapLnLsn)
Counts all active LSNs in a database as obsolete in the per-file
utilization summaries.
|
EnvironmentImpl |
getEnvironment() |
TrackedFileSummary |
getTrackedFile(long fileNum)
Returns one file from the snapshot of tracked files, or null if the
given file number is not in the snapshot array.
|
Collection<TrackedFileSummary> |
getTrackedFiles()
Returns a snapshot of the files being tracked as of the last time a
log entry was added.
|
static boolean |
isLNType(LogEntryType type)
Returns whether the given type is an LN; a null type is assumed to be an
LN.
|
static boolean |
trackObsoleteInfo(LogEntryType type)
Returns whether obsoleteness is tracked for the given type.
|
void |
transferToUtilizationTracker(UtilizationTracker tracker)
Transfers counts and offsets from this local tracker to the given
(global) UtilizationTracker.
|
public EnvironmentImpl getEnvironment()
public Collection<TrackedFileSummary> getTrackedFiles()
If files are added or removed from the collection of tracked files in real time, the returned collection will not be changed since it is a snapshot. But the objects contained in the collection are live and will be updated in real time under the log write latch. The collection and the objects in the collection should not be modified by the caller.
public TrackedFileSummary getTrackedFile(long fileNum)
getTrackedFiles()public void transferToUtilizationTracker(UtilizationTracker tracker) throws DatabaseException
When called after recovery has finished, must be called under the log write latch.
DatabaseExceptionpublic void countObsoleteDb(DbFileSummaryMap dbFileSummaries, long mapLnLsn)
For the global tracker, must be called under the log write latch.
dbFileSummaries - the map of Long file number to DbFileSummary for
a database that is being deleted.mapLnLsn - is the LSN of the MapLN when recovery is replaying the
truncate/remove, or NULL_LSN when called outside of recovery; obsolete
totals should only be counted when this LSN is prior to the LSN of the
FileSummaryLN for the file being counted.public static boolean trackObsoleteInfo(LogEntryType type)
public static boolean isLNType(LogEntryType type)
Copyright © 2024. All rights reserved.