|
|||||||||
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
public class Evictor
The Evictor looks through the INList for IN's and BIN's that are worthy of eviction. Once the nodes are selected, it removes all references to them so that they can be GC'd by the JVM.
Nested Class Summary | |
---|---|
static class |
Evictor.EvictProfile
|
Field Summary | |
---|---|
(package private) Evictor.EvictProfile |
evictProfile
|
static String |
SOURCE_CRITICAL
|
static String |
SOURCE_DAEMON
|
static String |
SOURCE_MANUAL
|
Fields inherited from class com.sleepycat.je.utilint.DaemonThread |
---|
name, nWakeupRequests, workQueue, workQueueLatch |
Constructor Summary | |
---|---|
Evictor(EnvironmentImpl envImpl,
String name)
|
Method Summary | |
---|---|
void |
addToQueue(Object o)
Evictor doesn't have a work queue so just throw an exception if it's ever called. |
void |
alert()
Wakeup the evictor only if it's not already active. |
void |
clearEnv()
|
void |
doCriticalEviction()
Do a check on whether synchronous eviction is needed. |
void |
doEvict(String source)
May be called by the evictor thread on wakeup or programatically. |
(package private) long |
evictBatch(String source,
long requiredEvictBytes)
Each iteration will latch and unlatch the major INList, and will attempt to evict requiredEvictBytes, but will give up after a complete pass over the major INList. |
(package private) IN |
getNextNode()
Used by unit tests. |
(package private) boolean |
isRunnable(String source)
Return true if eviction should happen. |
void |
loadStats(StatsConfig config,
EnvironmentStats stat)
Load stats. |
protected int |
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. |
void |
onWakeup()
Called whenever the daemon thread wakes up from a sleep. |
String |
toString()
|
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 |
Field Detail |
---|
public static final String SOURCE_DAEMON
public static final String SOURCE_MANUAL
public static final String SOURCE_CRITICAL
Evictor.EvictProfile evictProfile
Constructor Detail |
---|
public Evictor(EnvironmentImpl envImpl, String name) throws DatabaseException
DatabaseException
Method Detail |
---|
public String toString()
toString
in class DaemonThread
public void addToQueue(Object o) throws DatabaseException
addToQueue
in class DaemonThread
DatabaseException
public void loadStats(StatsConfig config, EnvironmentStats stat) throws DatabaseException
DatabaseException
public void clearEnv()
protected int nDeadlockRetries() throws DatabaseException
nDeadlockRetries
in class DaemonThread
DatabaseException
public void alert()
public void onWakeup() throws DatabaseException
onWakeup
in class DaemonThread
DatabaseException
public void doEvict(String source) throws DatabaseException
DatabaseException
public void doCriticalEviction() throws DatabaseException
DatabaseException
long evictBatch(String source, long requiredEvictBytes) throws DatabaseException
DatabaseException
boolean isRunnable(String source) throws DatabaseException
DatabaseException
public int normalizeLevel(IN in, int evictType)
IN getNextNode()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |