ca.uhn.cache.internal
Interface IChunkPurger

All Known Implementing Classes:
HibernateChunkStore

public interface IChunkPurger

Temporary interface to cache store for purging data. After 1st release these methods will be moved to IChunkStore and IQueryResultStore. Note: minimum stored data includes: query, expiry time, vogueness modifier, and vogueness.

Version:
$Revision: 1.1 $ updated on $Date: 2005/01/24 22:53:27 $ by $Author: bryan_tripp $
Author:
Bryan Tripp

Method Summary
 long getLowestVogueness()
           
 int getNumCachedItems()
           
 IChunkIterator getStaleChunks()
          Implementation hint: to avoid doing a calculation during the query, store chunk with its expiry time, not its max age, and implement this method as "select chunks where expiry time earlier than now".
 IChunkIterator getUnusedChunks(long theVoguenessThreshold)
          Returns chunks that have not been accessed recently.
 

Method Detail

getUnusedChunks

public IChunkIterator getUnusedChunks(long theVoguenessThreshold)
Returns chunks that have not been accessed recently. Specifically, those for which vogueness < theVoguenessThreshold. Recall from IUnusedChunkRule that vogueness = last access time + modifier. Implementation hint: to avoid doing a calculation during the query, store the modified version of last access time, and implement this method as "select chunks where mod_last_access earlier than theMaxAccessTime".

Parameters:
theVoguenessThreshold - chunks that have not been accessed since this time (accounting for modifier) are to be returned
Returns:
chunks for which the modified access time is earlier than theMaxAccessTime

getStaleChunks

public IChunkIterator getStaleChunks()
Implementation hint: to avoid doing a calculation during the query, store chunk with its expiry time, not its max age, and implement this method as "select chunks where expiry time earlier than now".

Returns:
chunks that have been in the cache longer than their maximum ages.

getLowestVogueness

public long getLowestVogueness()
Returns:
lowest vogueness of all chunks (based on the time at which the least recently used chunk was accessed; see IUnusedChunkRule)

getNumCachedItems

public int getNumCachedItems()
Returns:
the number of records currently stored by the cache


Copyright © 2004-2005 University Health Network. All Rights Reserved.