|
|||||||||
| 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.evictor.Evictor
com.sleepycat.je.evictor.SharedEvictor
public class SharedEvictor
The Evictor that operates on the INLists for multiple environments that share a single cache. Multiple iterators, once for each INList, are used to implement getNextIN. INs are returned from from each iterator in a round-robin rotation, giving larger INLists proportionally more rotations. This "mixes up" the INs from all INlists so that the LRU algorithm is applied across all lists.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.sleepycat.je.evictor.Evictor |
|---|
Evictor.EvictionSource, Evictor.EvictProfile |
| Field Summary |
|---|
| Fields inherited from class com.sleepycat.je.evictor.Evictor |
|---|
evictProfile, sharedCacheEnvs |
| Fields inherited from class com.sleepycat.je.utilint.DaemonThread |
|---|
envImpl, logger, name, nWakeupRequests, stifleExceptionChatter |
| Constructor Summary | |
|---|---|
SharedEvictor(EnvironmentImpl env,
long wakeupInterval,
String name)
|
|
| Method Summary | |
|---|---|
void |
addEnvironment(EnvironmentImpl env)
Synchronized so that the set of environments cannot be changed in the middle of an eviction (which is also synchronized). |
boolean |
checkEnv(EnvironmentImpl env)
Returns true if the given environment is present in the set of subject environments. |
void |
clearEnv()
Only supported by PrivateEvictor. |
(package private) StatGroup |
getINListStats(StatsConfig config)
Return stats for the multiple INLists covered by this evictor. |
(package private) int |
getMaxINsPerBatch()
Returns the total of all INList sizes, as of the last time sizes were initialized. |
(package private) IN |
getNextIN()
Returns the next IN, wrapping if necessary. |
(package private) Iterator<IN> |
getScanIterator()
|
StatGroup |
loadStats(StatsConfig config)
Load stats. |
void |
noteINListChange(int nINs)
After 1/INIT_SIZE_THRESHOLD of all INs have been changed, reinitialize the sizes. |
void |
removeEnvironment(EnvironmentImpl env)
Synchronized so that the set of environments cannot be changed in the middle of an eviction (which is also synchronized). |
(package private) void |
setScanIterator(Iterator<IN> iter)
|
(package private) long |
startBatch()
Initializes the sizes if needed, and performs special eviction for one environment in rotatation. |
| Methods inherited from class com.sleepycat.je.evictor.Evictor |
|---|
alert, doCriticalEviction, doEvict, evictBatch, evictIN, incBINEvictStats, incBINFetchStats, incINEvictStats, incINFetchStats, incLNFetchStats, isCacheFull, nDeadlockRetries, normalizeLevel, onWakeup, setPreEvictINHook, setRunnableHook, wasCacheEverFull |
| Methods inherited from class com.sleepycat.je.utilint.DaemonThread |
|---|
checkErrorListener, createLogger, getExceptionListener, getNWakeupRequests, getThread, isPaused, isRunning, isShutdownRequested, requestShutdown, run, runOrPause, setExceptionListener, shutdown, toString, wakeup |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SharedEvictor(EnvironmentImpl env,
long wakeupInterval,
String name)
throws DatabaseException
DatabaseException| Method Detail |
|---|
StatGroup getINListStats(StatsConfig config)
getINListStats in class Evictorpublic StatGroup loadStats(StatsConfig config)
Evictor
loadStats in class Evictorpublic void clearEnv()
clearEnv in class Evictorpublic void noteINListChange(int nINs)
noteINListChange in class Evictorpublic void addEnvironment(EnvironmentImpl env)
addEnvironment in class Evictorpublic void removeEnvironment(EnvironmentImpl env)
removeEnvironment in class Evictorpublic boolean checkEnv(EnvironmentImpl env)
checkEnv in class Evictor
long startBatch()
throws DatabaseException
startBatch in class EvictorDatabaseExceptionint getMaxINsPerBatch()
getMaxINsPerBatch in class EvictorIN getNextIN()
getNextIN in class EvictorIterator<IN> getScanIterator()
getScanIterator in class Evictorvoid setScanIterator(Iterator<IN> iter)
setScanIterator in class Evictor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||