com.sleepycat.je.evictor
Class PrivateEvictor

java.lang.Object
  extended by com.sleepycat.je.utilint.DaemonThread
      extended by com.sleepycat.je.evictor.Evictor
          extended by com.sleepycat.je.evictor.PrivateEvictor
All Implemented Interfaces:
DaemonRunner, ExceptionListenerUser, Runnable

public class PrivateEvictor
extends Evictor

The standard Evictor that operates on the INList for a single environment. A single iterator over the INList is used to implement getNextIN.


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
logger, name, nWakeupRequests, stifleExceptionChatter
 
Constructor Summary
PrivateEvictor(EnvironmentImpl envImpl, long wakeupInterval, String name)
           
 
Method Summary
 void addEnvironment(EnvironmentImpl unused)
          Only supported by SharedEvictor.
 boolean checkEnv(EnvironmentImpl env)
          Only supported by SharedEvictor.
 void clearEnv()
          Standard daemon method to set envImpl to null.
(package private)  StatGroup getINListStats(StatsConfig config)
          Return stats for the single INList covered by this evictor.
(package private)  int getMaxINsPerBatch()
          Returns the simple INList size.
(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)
          Do nothing.
 void onWakeup()
          Called whenever the daemon thread wakes up from a sleep.
 void removeEnvironment(EnvironmentImpl unused)
          Only supported by SharedEvictor.
(package private)  void setScanIterator(Iterator<IN> iter)
           
(package private)  long startBatch()
          Initializes the iterator, and performs special eviction once per batch.
 
Methods inherited from class com.sleepycat.je.evictor.Evictor
alert, doCriticalEviction, doEvict, evictBatch, evictIN, incBINEvictStats, incBINFetchStats, incINEvictStats, incINFetchStats, incLNFetchStats, isCacheFull, nDeadlockRetries, normalizeLevel, 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

PrivateEvictor

public PrivateEvictor(EnvironmentImpl envImpl,
                      long wakeupInterval,
                      String name)
               throws DatabaseException
Throws:
DatabaseException
Method Detail

loadStats

public StatGroup loadStats(StatsConfig config)
Description copied from class: Evictor
Load stats.

Overrides:
loadStats in class Evictor

onWakeup

public void onWakeup()
              throws DatabaseException
Description copied from class: Evictor
Called whenever the daemon thread wakes up from a sleep.

Overrides:
onWakeup in class Evictor
Throws:
DatabaseException

clearEnv

public void clearEnv()
Standard daemon method to set envImpl to null.

Specified by:
clearEnv in class Evictor

noteINListChange

public void noteINListChange(int nINs)
Do nothing.

Specified by:
noteINListChange in class Evictor

addEnvironment

public void addEnvironment(EnvironmentImpl unused)
Only supported by SharedEvictor.

Specified by:
addEnvironment in class Evictor

removeEnvironment

public void removeEnvironment(EnvironmentImpl unused)
Only supported by SharedEvictor.

Specified by:
removeEnvironment in class Evictor

checkEnv

public boolean checkEnv(EnvironmentImpl env)
Only supported by SharedEvictor.

Specified by:
checkEnv in class Evictor

startBatch

long startBatch()
          throws DatabaseException
Initializes the iterator, and performs special eviction once per batch.

Specified by:
startBatch in class Evictor
Throws:
DatabaseException

getMaxINsPerBatch

int getMaxINsPerBatch()
Returns the simple INList size.

Specified by:
getMaxINsPerBatch in class Evictor

getNextIN

IN getNextIN()
Returns the next IN, wrapping if necessary.

Specified by:
getNextIN in class Evictor

getINListStats

StatGroup getINListStats(StatsConfig config)
Return stats for the single INList covered by this evictor.

Specified by:
getINListStats in class Evictor

getScanIterator

Iterator<IN> getScanIterator()
Specified by:
getScanIterator in class Evictor

setScanIterator

void setScanIterator(Iterator<IN> iter)
Specified by:
setScanIterator in class Evictor


Copyright (c) 2004-2010 Oracle. All rights reserved.