|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sleepycat.je.utilint.DaemonThread
com.sleepycat.je.cleaner.FileProcessor
class FileProcessor
Reads all entries in a log file and either determines them to be obsolete or marks them for migration. LNs are marked for migration by setting the BIN entry MIGRATE flag. INs are marked for migration by setting the dirty flag. May be invoked explicitly by calling doClean, or woken up if used as a daemon thread.
| Field Summary |
|---|
| Fields inherited from class com.sleepycat.je.utilint.DaemonThread |
|---|
name, nWakeupRequests, workQueue, workQueueLatch |
| Constructor Summary | |
|---|---|
FileProcessor(String name,
EnvironmentImpl env,
Cleaner cleaner,
UtilizationProfile profile,
FileSelector fileSelector)
|
|
| Method Summary | |
|---|---|
void |
addToQueue(Object o)
Cleaner doesn't have a work queue so just throw an exception if it's ever called. |
void |
clearEnv()
|
int |
doClean(boolean invokedFromDaemon,
boolean cleanMultipleFiles,
boolean forceCleaning)
Cleans selected files and returns the number of files cleaned. |
protected int |
nDeadlockRetries()
Return the number of retries when a deadlock exception occurs. |
void |
onWakeup()
Activates the cleaner. |
String |
toString()
XXX: Was this intended to override Thread.toString()? If so it no longer does, because we separated Thread from DaemonThread. |
| Methods inherited from class com.sleepycat.je.utilint.DaemonThread |
|---|
addToQueueAlreadyLatched, getNWakeupRequests, getQueueSize, getThread, isRunning, isShutdownRequested, requestShutdown, run, runOrPause, shutdown, wakeup |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
FileProcessor(String name,
EnvironmentImpl env,
Cleaner cleaner,
UtilizationProfile profile,
FileSelector fileSelector)
| Method Detail |
|---|
public void clearEnv()
protected int nDeadlockRetries()
throws DatabaseException
nDeadlockRetries in class DaemonThreadDatabaseException
public void addToQueue(Object o)
throws DatabaseException
addToQueue in class DaemonThreadDatabaseException
public void onWakeup()
throws DatabaseException
onWakeup in class DaemonThreadDatabaseException
public int doClean(boolean invokedFromDaemon,
boolean cleanMultipleFiles,
boolean forceCleaning)
throws DatabaseException
invokedFromDaemon - currently has no effect.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.
DatabaseExceptionpublic String toString()
toString in class DaemonThread
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||