public class Cleaner extends java.lang.Object implements DaemonRunner, EnvConfigObserver
Constructor and Description |
---|
Cleaner(EnvironmentImpl env,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
clearDeleteProhibited() |
int |
doClean(boolean cleanMultipleFiles,
boolean forceCleaning)
Cleans selected files and returns the number of files cleaned.
|
void |
envConfigUpdate(DbConfigManager cm)
Process notifications of mutable property changes.
|
boolean |
getFetchObsoleteSize() |
FileSelector.CheckpointStartCleanerState |
getFilesAtCheckpointStart()
Returns a copy of the cleaned and processed files at the time a
checkpoint starts.
|
int |
getNWakeupRequests() |
UtilizationProfile |
getUtilizationProfile() |
UtilizationTracker |
getUtilizationTracker() |
boolean |
isEvictable(BIN bin,
int index)
Returns whether the given BIN entry may be stripped by the evictor.
|
void |
lazyMigrateDupCountLN(DIN din,
ChildReference dclRef,
boolean proactiveMigration)
This method should be called just before logging a root DIN.
|
void |
lazyMigrateLNs(BIN bin,
boolean proactiveMigration,
boolean backgroundIO)
This method should be called just before logging a BIN.
|
void |
loadStats(StatsConfig config,
EnvironmentStats stat)
Load stats.
|
void |
requestShutdown() |
void |
runOrPause(boolean run) |
void |
setDeleteProhibited() |
void |
shutdown() |
void |
updateFilesAtCheckpointEnd(FileSelector.CheckpointStartCleanerState info)
When a checkpoint is complete, update the files that were returned at
the beginning of the checkpoint.
|
void |
updateReadOnlyFileCollections()
Update the lowUtilizationFiles and mustBeCleanedFiles fields with new
read-only collections, and update the backlog file count.
|
void |
wakeup() |
public Cleaner(EnvironmentImpl env, java.lang.String name) throws DatabaseException
DatabaseException
public void envConfigUpdate(DbConfigManager cm) throws DatabaseException
envConfigUpdate
in interface EnvConfigObserver
DatabaseException
public UtilizationTracker getUtilizationTracker()
public UtilizationProfile getUtilizationProfile()
public boolean getFetchObsoleteSize()
public void runOrPause(boolean run)
runOrPause
in interface DaemonRunner
public void wakeup()
public void requestShutdown()
requestShutdown
in interface DaemonRunner
public void shutdown()
shutdown
in interface DaemonRunner
public int getNWakeupRequests()
getNWakeupRequests
in interface DaemonRunner
public int doClean(boolean cleanMultipleFiles, boolean forceCleaning) throws DatabaseException
cleanMultipleFiles
- is true to clean until we're under budget,
or false to clean at most one file.forceCleaning
- is true to clean even if we're not under the
utilization threshold.DatabaseException
public void loadStats(StatsConfig config, EnvironmentStats stat) throws DatabaseException
DatabaseException
public void setDeleteProhibited()
public void clearDeleteProhibited()
public FileSelector.CheckpointStartCleanerState getFilesAtCheckpointStart() throws DatabaseException
If non-null is returned, the checkpoint should flush an extra level, and addCheckpointedFiles() should be called when the checkpoint is complete.
DatabaseException
public void updateFilesAtCheckpointEnd(FileSelector.CheckpointStartCleanerState info) throws DatabaseException
DatabaseException
public void updateReadOnlyFileCollections()
public boolean isEvictable(BIN bin, int index)
public void lazyMigrateLNs(BIN bin, boolean proactiveMigration, boolean backgroundIO) throws DatabaseException
On return this method guarantees that no MIGRATE flag will be set on any child entry. If this method is *not* called before logging a BIN, then the addPendingLNs method must be called.
bin
- is the latched BIN. The latch will not be released by this
method.proactiveMigration
- perform proactive migration if needed; this is
false during a split, to reduce the delay in the user operation.DatabaseException
public void lazyMigrateDupCountLN(DIN din, ChildReference dclRef, boolean proactiveMigration) throws DatabaseException
On return this method guarantees that the MIGRATE flag will not be set on the child entry. If this method is *not* called before logging a root DIN, then the addPendingDupCountLN method must be called.
din
- is the latched DIN. The latch will not be released by this
method.dclRef
- is the reference to the DupCountLN.proactiveMigration
- perform proactive migration if needed; this is
false during a split, to reduce the delay in the user operation.DatabaseException