public abstract class Evictor extends java.lang.Object implements EnvConfigObserver
Modifier and Type | Class and Description |
---|---|
(package private) static class |
Evictor.BackgroundEvictTask |
(package private) static interface |
Evictor.DbCache
Caches DatabaseImpls to reduce DbTree.getDb overhead.
|
static class |
Evictor.EvictionSource |
(package private) static class |
Evictor.RejectEvictHandler |
Modifier and Type | Field and Description |
---|---|
(package private) int |
dbCacheClearCount |
(package private) EnvironmentImpl |
envImpl |
Constructor and Description |
---|
Evictor(EnvironmentImpl envImpl) |
Modifier and Type | Method and Description |
---|---|
void |
addEnvironment(EnvironmentImpl additionalEnvImpl) |
void |
alert()
Let the eviction pool know there's work to do.
|
boolean |
checkEnv(EnvironmentImpl env)
Only supported by SharedEvictor.
|
(package private) abstract Evictor.DbCache |
createDbCache() |
void |
doCriticalEviction(boolean backgroundIO)
Do some eviction before proceeding on with another operation.
|
void |
doDaemonEviction(boolean backgroundIO)
Do a check on whether synchronous eviction is needed.
|
(package private) void |
doEvict(Evictor.EvictionSource source,
boolean backgroundIO)
Can execute concurrently, called by app threads or by background evictor
|
void |
doEvictOneIN(IN target,
Evictor.EvictionSource source)
Evict a specific IN, used by cache modes.
|
void |
doManualEvict() |
void |
envConfigUpdate(DbConfigManager configManager,
EnvironmentMutableConfig ignore)
Respond to config updates.
|
(package private) long |
evictBatch(Evictor.EvictionSource source,
boolean backgroundIO,
long maxEvictBytes)
Each iteration will attempt to evict maxEvictBytes, but will give up
after a complete pass over the INList, or if there is nothing more to
evict, due to actions by concurrently executing threads.
|
java.util.concurrent.atomic.AtomicLong |
getNINCompactKey() |
java.util.concurrent.atomic.AtomicLong |
getNINNoTarget() |
java.util.concurrent.atomic.AtomicLong |
getNINSparseTarget() |
(package private) TargetSelector |
getSelector() |
StatGroup |
getStatsGroup() |
java.util.concurrent.ThreadPoolExecutor |
getThreadPool() |
void |
incBINEvictStats(Evictor.EvictionSource source) |
void |
incBINFetchStats(boolean isMiss) |
void |
incINEvictStats(Evictor.EvictionSource source) |
void |
incINFetchStats(boolean isMiss) |
void |
incLNFetchStats(boolean isMiss)
Update the appropriate fetch stat, based on node type.
|
boolean |
isCacheFull() |
StatGroup |
loadStats(StatsConfig config)
Load stats.
|
(package private) abstract TargetSelector |
makeSelector() |
void |
noteINListChange(int nINs)
Called whenever INs are added to, or removed from, the INList.
|
void |
removeEnvironment(EnvironmentImpl targetEnvImpl) |
void |
requestShutdownPool() |
void |
setEvictProfileHook(TestHook<IN> hook) |
void |
setPreEvictINHook(TestHook<java.lang.Object> hook) |
void |
setRunnableHook(TestHook<java.lang.Boolean> hook) |
void |
shutdown()
Request and wait for a shutdown of all running eviction tasks.
|
boolean |
wasCacheEverFull() |
final EnvironmentImpl envImpl
int dbCacheClearCount
Evictor(EnvironmentImpl envImpl) throws DatabaseException
DatabaseException
public void envConfigUpdate(DbConfigManager configManager, EnvironmentMutableConfig ignore) throws DatabaseException
envConfigUpdate
in interface EnvConfigObserver
DatabaseException
abstract TargetSelector makeSelector()
public StatGroup loadStats(StatsConfig config)
public void doCriticalEviction(boolean backgroundIO)
public void doDaemonEviction(boolean backgroundIO)
public void doManualEvict() throws DatabaseException
DatabaseException
public void doEvictOneIN(IN target, Evictor.EvictionSource source)
public void alert()
public java.util.concurrent.ThreadPoolExecutor getThreadPool()
void doEvict(Evictor.EvictionSource source, boolean backgroundIO) throws DatabaseException
DatabaseException
long evictBatch(Evictor.EvictionSource source, boolean backgroundIO, long maxEvictBytes) throws DatabaseException
DatabaseException
public void incBINEvictStats(Evictor.EvictionSource source)
public void incINEvictStats(Evictor.EvictionSource source)
public void incLNFetchStats(boolean isMiss)
public void incBINFetchStats(boolean isMiss)
public void incINFetchStats(boolean isMiss)
public java.util.concurrent.atomic.AtomicLong getNINSparseTarget()
public java.util.concurrent.atomic.AtomicLong getNINNoTarget()
public java.util.concurrent.atomic.AtomicLong getNINCompactKey()
public void addEnvironment(EnvironmentImpl additionalEnvImpl)
public void removeEnvironment(EnvironmentImpl targetEnvImpl)
public void setPreEvictINHook(TestHook<java.lang.Object> hook)
public void noteINListChange(int nINs)
public boolean checkEnv(EnvironmentImpl env)
public StatGroup getStatsGroup()
public void setRunnableHook(TestHook<java.lang.Boolean> hook)
public boolean isCacheFull()
public boolean wasCacheEverFull()
TargetSelector getSelector()
public void shutdown()
public void requestShutdownPool()
abstract Evictor.DbCache createDbCache()
Copyright (c) 2004-2012 Oracle. All rights reserved.