org.objectweb.cjdbc.controller.cache.result.threads
Class RelaxedCacheThread

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.objectweb.cjdbc.controller.cache.result.threads.RelaxedCacheThread
All Implemented Interfaces:
java.lang.Runnable

public final class RelaxedCacheThread
extends java.lang.Thread

This thread manages relaxed cache entries and remove them from the cache if their deadline has expired or they are dirty.

Version:
1.0
Author:
Nicolas Modrzyk

Field Summary
private  ResultCache cache
           
private  boolean isKilled
           
private  Trace logger
           
(package private)  int refreshCacheRate
           
(package private)  int refreshCacheTime
           
private  long threadWakeUpTime
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
RelaxedCacheThread(ResultCache cache)
          Creates a new RelaxedCacheThread object
RelaxedCacheThread(ResultCache cache, int refreshCacheRate)
          Creates a new RelaxedCacheThread object
 
Method Summary
 long getThreadWakeUpTime()
          Returns the threadWakeUpTime value.
 void run()
           
 void shutdown()
          Shutdown the current thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

threadWakeUpTime

private long threadWakeUpTime

cache

private final ResultCache cache

refreshCacheRate

int refreshCacheRate

refreshCacheTime

int refreshCacheTime

logger

private Trace logger

isKilled

private boolean isKilled
Constructor Detail

RelaxedCacheThread

public RelaxedCacheThread(ResultCache cache)
Creates a new RelaxedCacheThread object

Parameters:
cache - ResultCache creating this thread

RelaxedCacheThread

public RelaxedCacheThread(ResultCache cache,
                          int refreshCacheRate)
Creates a new RelaxedCacheThread object

Parameters:
cache - ResultCache creating this thread
refreshCacheRate - cache refresh rate in seconds
Method Detail

getThreadWakeUpTime

public long getThreadWakeUpTime()
Returns the threadWakeUpTime value.

Returns:
Returns the threadWakeUpTime.

run

public void run()
See Also:
Runnable.run()

shutdown

public void shutdown()
Shutdown the current thread.



Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.