org.xmlecho.palomar.cache
Class Controller

java.lang.Object
  extended byorg.xmlecho.palomar.cache.Controller
All Implemented Interfaces:
java.lang.Runnable

public abstract class Controller
extends java.lang.Object
implements java.lang.Runnable

Abstract class for all cache controllers. No specific abstract methods but sub classes should implement the run() method.


Field Summary
protected  Cache cacheToRefresh
          specific cache to work on
protected  long nextWakeupTime
           
protected  long wakeupTime
           
 
Constructor Summary
Controller()
           
 
Method Summary
 Cache getCache()
          getter
 long getNextWakeupTime()
           
 long getRefreshTime()
           
 void setCache(Cache cacheToRefresh)
          Set the cache to be refreshed
 void setNextWakeupTime(long sleepFor)
           
 void setRefreshTime(long wakeupTime)
          Setter for controller wakeup time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 

Field Detail

cacheToRefresh

protected Cache cacheToRefresh
specific cache to work on


wakeupTime

protected long wakeupTime

nextWakeupTime

protected long nextWakeupTime
Constructor Detail

Controller

public Controller()
Method Detail

setCache

public void setCache(Cache cacheToRefresh)
Set the cache to be refreshed


getCache

public Cache getCache()
getter


setRefreshTime

public void setRefreshTime(long wakeupTime)
Setter for controller wakeup time. Thumb rule - generally greater than the default object's ttl


getRefreshTime

public long getRefreshTime()

setNextWakeupTime

public void setNextWakeupTime(long sleepFor)

getNextWakeupTime

public long getNextWakeupTime()