ca.uhn.cache.internal.impl
Class CacheCleaner
java.lang.Object
ca.uhn.cache.internal.impl.CacheCleaner
- All Implemented Interfaces:
- ICacheCleaner
- public class CacheCleaner
- extends java.lang.Object
- implements ICacheCleaner
Default implementation of ICacheCleaner.
- Version:
- $Revision: 1.1 $ updated on $Date: 2005/01/24 22:54:03 $ by $Author: bryan_tripp $
- Author:
- Bryan Tripp
Method Summary |
void |
evictStaleChunks()
Removes from the cache any chunks that are older than their maximum age. |
void |
evictUnusedChunks()
Removes from the cache any chunks that are unlikely to be used in the near future,
according to getUnusedChunkRule(). |
long |
getTargetSize()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CacheCleaner
public CacheCleaner(IChunkStore theChunkStore,
IChunkPurger thePurger,
int theTargetSize,
IQueryResultStore theItemStore,
float theAgeDecrement)
- Parameters:
theChunkStore
- chunk store cleaned by this cleanerthePurger
- a specialized interface to the same storetheTargetSize
- as in getTargetSize()theItemStore
- query result store that corresponds to the chunk storetheAgeDecrement
- unused chunks are evicted in blocks according to the age of last usage,
and this param is the size of each block as a proportion of greatest age in the cache
(.01 = 1%, i.e. chunks divided into 100 blocks)
getTargetSize
public long getTargetSize()
- Specified by:
getTargetSize
in interface ICacheCleaner
- Returns:
- target size of cache: if there are more records than this in the cache,
less useful records will be evicted
- See Also:
ICacheCleaner.getTargetSize()
evictStaleChunks
public void evictStaleChunks()
- Description copied from interface:
ICacheCleaner
- Removes from the cache any chunks that are older than their maximum age.
- Specified by:
evictStaleChunks
in interface ICacheCleaner
- See Also:
ICacheCleaner.evictStaleChunks()
evictUnusedChunks
public void evictUnusedChunks()
- Description copied from interface:
ICacheCleaner
- Removes from the cache any chunks that are unlikely to be used in the near future,
according to getUnusedChunkRule().
- Specified by:
evictUnusedChunks
in interface ICacheCleaner
- See Also:
ICacheCleaner.evictUnusedChunks()
Copyright © 2004-2005 University Health Network. All Rights Reserved.