View Javadoc

1   /*
2    * Copyright (c) 2004-2005, University Health Network.  All rights reserved. Distributed under the BSD 
3    * license (see http://opensource.org/licenses/bsd-license.php).
4    *  
5    * Created on 4-Jan-2005
6    */
7   package ca.uhn.cache.internal;
8   
9   /***
10   * Determiner of whether a chunk is likely to be out of synch with changes to original 
11   * data.  
12   * 
13   * @author <a href="mailto:bryan.tripp@uhn.on.ca">Bryan Tripp</a>
14   * @version $Revision: 1.1 $ updated on $Date: 2005/01/24 22:53:27 $ by $Author: bryan_tripp $
15   */
16  public interface IStaleChunkRule {
17      
18      /***
19       * @param theChunk a chunk to be cached 
20       * @return the age of the chunk (i.e. time since cache, in ms) after which the chunk 
21       *      must be evicted, because it is likely to be out of synch with the original data
22       *      source.  This is normally a function of last update time and volatility.  
23       */
24      public long getMaxAge(IChunk theChunk);
25      
26  }