ca.uhn.cache.internal
Interface IChunkStore

All Known Implementing Classes:
HibernateChunkStore

public interface IChunkStore

A Map like interface to store IChunks.

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

Method Summary
 IChunk get(IQuery theQuery)
           
 IStaleChunkRule getStaleChunkRule()
           
 IChunk put(IQuery theQuery, VolatilityEnum theVolatility, CacheReasonEnum[] theReasons)
          Places a IChunk corresponding to the specified IQuery in this IChunkStore.
 IChunk remove(IQuery theQuery)
          Removes the mapping for this query from this IChunkStore if it is present
 

Method Detail

get

public IChunk get(IQuery theQuery)
Parameters:
theQuery - The specified query.
Returns:
The value to which this IChunkStore maps the specified query, or null if the IChunkStore contains no mapping for the query.

put

public IChunk put(IQuery theQuery,
                  VolatilityEnum theVolatility,
                  CacheReasonEnum[] theReasons)
Places a IChunk corresponding to the specified IQuery in this IChunkStore. If the IChunkStore previously contained a mapping for this query, the value is replaced by a new IChunk with the new volatility and reasons.

Parameters:
theQuery - Query with which the chunk is to be associated.
theVolatility - The volatility that will decide the length of stay in the cache. If there is a mapping for this query currently in the cache, this will replace the old value.
theReasons - The reasons that this chunk was cached. If there is a mapping for this query currently in the cache, this will be appended to the old value.
Returns:
Previous value associated with specified query, or null if there was no mapping for the query.

remove

public IChunk remove(IQuery theQuery)
Removes the mapping for this query from this IChunkStore if it is present

Parameters:
theQuery - Query whose mapping is to be removed from the IChunkStore.
Returns:
Previous value associated with specified query, or null if there was no mapping for the query.

getStaleChunkRule

public IStaleChunkRule getStaleChunkRule()
Returns:
Returns the rule used to determine when chunks will expire.


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