Clover coverage report -
Coverage timestamp: Thu Jul 5 2007 20:02:32 EDT
file stats: LOC: 48   Methods: 4
NCLOC: 26   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
LRUPolicy.java - 100% 100% 100%
coverage
 1    /*
 2    * JBoss, the OpenSource J2EE webOS
 3    *
 4    * Distributable under LGPL license.
 5    * See terms of license at gnu.org.
 6    * Created on March 25 2003
 7    */
 8    package org.jboss.cache.eviction;
 9   
 10    import org.jboss.cache.CacheSPI;
 11    import org.jboss.cache.RegionManager;
 12   
 13    /**
 14    * Provider to provide eviction policy. This one is based on LRU algorithm that a user
 15    * can specify either maximum number of nodes or the idle time of a node to be evicted.
 16    *
 17    * @author Ben Wang 02-2004
 18    * @author Daniel Huang - dhuang@jboss.org
 19    * @version $Revision: 1.13 $
 20    */
 21    public class LRUPolicy extends BaseEvictionPolicy implements EvictionPolicy
 22    {
 23    protected RegionManager regionManager_;
 24   
 25    protected EvictionAlgorithm algorithm;
 26   
 27  4032 public LRUPolicy()
 28    {
 29  4032 super();
 30  4032 algorithm = new LRUAlgorithm();
 31    }
 32   
 33  775 public EvictionAlgorithm getEvictionAlgorithm()
 34    {
 35  775 return algorithm;
 36    }
 37   
 38  2972 public Class<LRUConfiguration> getEvictionConfigurationClass()
 39    {
 40  2972 return LRUConfiguration.class;
 41    }
 42   
 43  1060 public void setCache(CacheSPI cache)
 44    {
 45  1060 super.setCache(cache);
 46  1060 regionManager_ = cache_.getRegionManager();
 47    }
 48    }