com.sleepycat.je.cleaner
Class FilesToMigrate
java.lang.Object
com.sleepycat.je.cleaner.FilesToMigrate
class FilesToMigrate
- extends Object
Iterator over files that should be migrated by cleaning them, even if
they don't need to be cleaned for other reasons.
Files are migrated either because they are named in the
CLEANER_FORCE_CLEAN_FILES parameter or their log version is prior to the
CLEANER_UPGRADE_TO_LOG_VERSION parameter.
An iterator is used rather than finding the entire set at startup to
avoid opening a large number of files to examine their log version. For
example, if all files are being migrated in a very large data set, this
would involve opening a very large number of files in order to read
their header. This could significantly delay application startup.
Because we don't have the entire set at startup, we can't select the
lowest utilization file from the set to clean next. Inteaad we iterate
in file number order to increase the odds of cleaning lower utilization
files first.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilesToMigrate
FilesToMigrate(EnvironmentImpl env)
hasNext
boolean hasNext(SortedMap<Long,FileSummary> fileSummaryMap)
- Returns whether there are more files to be migrated. Must be called
while synchronized on the UtilizationProfile.
next
long next(SortedMap<Long,FileSummary> fileSummaryMap)
throws NoSuchElementException
- Returns the next file file to be migrated. Must be called while
synchronized on the UtilizationProfile.
- Throws:
NoSuchElementException
Copyright (c) 2004-2012 Oracle. All rights reserved.