public abstract class Evictor extends DaemonThread
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
Evictor.EvictProfile |
| Modifier and Type | Field and Description |
|---|---|
(package private) Evictor.EvictProfile |
evictProfile |
static java.lang.String |
SOURCE_CRITICAL |
static java.lang.String |
SOURCE_DAEMON |
static java.lang.String |
SOURCE_MANUAL |
name, nWakeupRequests, stifleExceptionChatter| Constructor and Description |
|---|
Evictor(EnvironmentImpl envImpl,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addEnvironment(EnvironmentImpl envImpl)
Only supported by SharedEvictor.
|
void |
alert()
Wakeup the evictor only if it's not already active.
|
abstract boolean |
checkEnvs(java.util.Set<EnvironmentImpl> envs)
Only supported by SharedEvictor.
|
abstract void |
clearEnv()
Standard daemon method to set envImpl to null.
|
void |
doCriticalEviction(boolean backgroundIO)
Do a check on whether synchronous eviction is needed.
|
void |
doEvict(java.lang.String source)
May be called by the evictor thread on wakeup or programatically.
|
(package private) long |
evictBatch(java.lang.String source,
boolean backgroundIO,
long requiredEvictBytes)
Each iteration will attempt to evict requiredEvictBytes, but will give
up after a complete pass over the INList.
|
(package private) abstract java.util.logging.Logger |
getLogger() |
(package private) abstract int |
getMaxINsPerBatch()
Returns the approximate number of total INs in the INList(s).
|
(package private) abstract IN |
getNextIN()
Returns the next IN in the INList(s), wrapping if necessary.
|
(package private) abstract java.util.Iterator<IN> |
getScanIterator() |
void |
loadStats(StatsConfig config,
EnvironmentStats stat)
Load stats.
|
protected long |
nDeadlockRetries()
Return the number of retries when a deadlock exception occurs.
|
int |
normalizeLevel(IN in,
int evictType)
Normalize the tree level of the given IN.
|
abstract void |
noteINListChange(int nINs)
Called whenever INs are added to, or removed from, the INList.
|
void |
onWakeup()
Called whenever the daemon thread wakes up from a sleep.
|
abstract void |
removeEnvironment(EnvironmentImpl envImpl)
Only supported by SharedEvictor.
|
void |
setRunnableHook(TestHook hook) |
(package private) abstract void |
setScanIterator(java.util.Iterator<IN> iter) |
(package private) abstract long |
startBatch()
Perform class-specific batch processing: Initialize iterator, perform
UtilizationTracker eviction, etc.
|
checkErrorListener, getExceptionListener, getNWakeupRequests, getThread, isPaused, isRunning, isShutdownRequested, requestShutdown, run, runOrPause, setExceptionListener, shutdown, toString, wakeuppublic static final java.lang.String SOURCE_DAEMON
public static final java.lang.String SOURCE_MANUAL
public static final java.lang.String SOURCE_CRITICAL
Evictor.EvictProfile evictProfile
Evictor(EnvironmentImpl envImpl, java.lang.String name) throws DatabaseException
DatabaseExceptionpublic void loadStats(StatsConfig config, EnvironmentStats stat) throws DatabaseException
DatabaseExceptionprotected long nDeadlockRetries()
throws DatabaseException
nDeadlockRetries in class DaemonThreadDatabaseExceptionpublic void alert()
public void onWakeup()
throws DatabaseException
onWakeup in class DaemonThreadDatabaseExceptionpublic void doEvict(java.lang.String source)
throws DatabaseException
DatabaseExceptionpublic void doCriticalEviction(boolean backgroundIO)
throws DatabaseException
DatabaseExceptionlong evictBatch(java.lang.String source,
boolean backgroundIO,
long requiredEvictBytes)
throws DatabaseException
DatabaseExceptionpublic int normalizeLevel(IN in, int evictType)
public void setRunnableHook(TestHook hook)
public abstract void clearEnv()
public abstract void noteINListChange(int nINs)
public abstract void addEnvironment(EnvironmentImpl envImpl)
public abstract void removeEnvironment(EnvironmentImpl envImpl)
public abstract boolean checkEnvs(java.util.Set<EnvironmentImpl> envs)
abstract java.util.logging.Logger getLogger()
abstract long startBatch()
throws DatabaseException
DatabaseExceptionabstract int getMaxINsPerBatch()
abstract IN getNextIN()
abstract java.util.Iterator<IN> getScanIterator()
abstract void setScanIterator(java.util.Iterator<IN> iter)
Copyright (c) 2004,2008 Oracle. All rights reserved.