org.cdlib.xtf.textEngine
Class IndexWarmer.BgThread

Object
  extended by Thread
      extended by IndexWarmer.BgThread
All Implemented Interfaces:
Runnable
Enclosing class:
IndexWarmer

private static class IndexWarmer.BgThread
extends Thread

Thread that sits in the background and periodically checks if there are indexes in need of warming, and warms them.


Nested Class Summary
 
Nested classes/interfaces inherited from class Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  long prevWarmTime
           
private  boolean shouldStop
           
private  IndexWarmer warmer
           
 
Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
IndexWarmer.BgThread(IndexWarmer warmer)
           
 
Method Summary
 void run()
           
private  IndexWarmer.Entry scanForUpdates()
           
private  void warm(IndexWarmer.Entry ent, boolean validateOk)
          Does the work of warming up an index.
 
Methods inherited from class Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

warmer

private IndexWarmer warmer

prevWarmTime

private long prevWarmTime

shouldStop

private boolean shouldStop
Constructor Detail

IndexWarmer.BgThread

IndexWarmer.BgThread(IndexWarmer warmer)
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

scanForUpdates

private IndexWarmer.Entry scanForUpdates()

warm

private void warm(IndexWarmer.Entry ent,
                  boolean validateOk)
Does the work of warming up an index.