1 /* 2 * JBoss, Home of Professional Open Source 3 * 4 * Distributable under LGPL license. 5 * See terms of license at gnu.org. 6 */ 7 package org.jboss.cache.eviction; 8 9 import org.jboss.cache.config.ConfigurationException; 10 11 /** 12 * This class encapsulates the configuration element for the eviction policies. 13 * <p/> 14 * In it's most basic form, it is implemented by {@link EvictionPolicyConfigBase}, but 15 * more specific eviction policies may subclass or re-implement this interface 16 * to provide access to more config variables. 17 * 18 * @author <a HREF="mailto:manik@jboss.org">Manik Surtani (manik@jboss.org)</a> 19 */ 20 public interface EvictionPolicyConfig 21 { 22 /** 23 * Gets the class name of the {@link EvictionPolicy} implementation 24 * this object will be used to configure. Used by {@link org.jboss.cache.RegionManager} 25 * to instantiate the policy. 26 * 27 * @return fully qualified class name 28 */ 29 String getEvictionPolicyClass(); 30 31 /** 32 * Validate the configuration. Will be called after any configuration 33 * properties are set. 34 * 35 * @throws ConfigurationException if any values for the configuration 36 * properties are invalid 37 */ 38 void validate() throws ConfigurationException; 39 40 /** 41 * Resets the values to their defaults. 42 */ 43 void reset(); 44 } 45