|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLogEnabled | +--org.apache.excalibur.store.impl.StoreJanitorImpl
This class is a implentation of a StoreJanitor. Store classes can register to the StoreJanitor. When memory is too low, the StoreJanitor frees the registered caches until memory is normal.
Field Summary | |
protected boolean |
invokeGC
Should the gc be called on low memory? |
Fields inherited from interface org.apache.excalibur.store.StoreJanitor |
ROLE |
Constructor Summary | |
StoreJanitorImpl()
|
Method Summary | |
Iterator |
iterator()
This method return a java.util.Iterator of every registered stores The iterators returned is fail-fast: if list is structurally modified at any time after the iterator is created, in any way, the iterator will throw a ConcurrentModificationException. |
void |
parameterize(Parameters params)
Initialize the StoreJanitorImpl. |
void |
register(Store store)
This method register the stores |
void |
run()
The "checker" thread checks if memory is running low in the jvm. |
void |
start()
|
void |
stop()
|
void |
unregister(Store store)
This method unregister the stores |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean invokeGC
Constructor Detail |
public StoreJanitorImpl()
Method Detail |
public void parameterize(Parameters params) throws ParameterException
cleanupthreadinterval
defines the maximum cleanup interval.
Cleanup interval then is determined based on the memory fill rate: the faster memory is filled in,
and the less free memory is left, the shorter is the cleanup time.
parameterize
in interface Parameterizable
params
- the Configuration of the application
ParameterException
public void start()
start
in interface Startable
public void stop()
stop
in interface Startable
public void run()
run
in interface Runnable
public void register(Store store)
register
in interface StoreJanitor
store
- the store to be registeredpublic void unregister(Store store)
unregister
in interface StoreJanitor
store
- the store to be unregisteredpublic Iterator iterator()
iterator
in interface StoreJanitor
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |