org.jboss.cache.eviction
Class ElementSizeConfiguration
java.lang.Object
org.jboss.cache.config.ConfigurationComponent
org.jboss.cache.eviction.EvictionPolicyConfigBase
org.jboss.cache.eviction.ElementSizeConfiguration
- All Implemented Interfaces:
- Serializable, Cloneable, EvictionPolicyConfig
public class ElementSizeConfiguration
- extends EvictionPolicyConfigBase
Configuration for ElementSizePolicy
.
If configured via XML, expects the following:
100
10000
Requires a positive "maxElementsPerNode" value otherwise a ConfigurationException is thrown.
- Version:
- $Revision: 4682 $
- Author:
- Daniel Huang, Brian Stansberry
- See Also:
- Serialized Form
ElementSizeConfiguration
public ElementSizeConfiguration()
setEvictionPolicyClassName
protected void setEvictionPolicyClassName()
- Description copied from class:
EvictionPolicyConfigBase
- This method should be overridden by subclass implementers to set the default
policy class name
for the subclass.
This will be called when the implementation is constructed, but is also
called in EvictionPolicyConfigBase.reset()
.
- Specified by:
setEvictionPolicyClassName
in class EvictionPolicyConfigBase
getMaxElementsPerNode
public int getMaxElementsPerNode()
setMaxElementsPerNode
public void setMaxElementsPerNode(int maxElementsPerNode)
validate
public void validate()
throws ConfigurationException
- Requires a positive maxElementsPerNode value or ConfigurationException
is thrown.
- Specified by:
validate
in interface EvictionPolicyConfig
- Overrides:
validate
in class EvictionPolicyConfigBase
- Throws:
ConfigurationException
- if any values for the configuration
properties are invalid
toString
public String toString()
- Overrides:
toString
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class EvictionPolicyConfigBase
hashCode
public int hashCode()
- Overrides:
hashCode
in class EvictionPolicyConfigBase
reset
public void reset()
- Description copied from interface:
EvictionPolicyConfig
- Resets the values to their defaults.
- Specified by:
reset
in interface EvictionPolicyConfig
- Overrides:
reset
in class EvictionPolicyConfigBase
clone
public ElementSizeConfiguration clone()
throws CloneNotSupportedException
- Overrides:
clone
in class ConfigurationComponent
- Throws:
CloneNotSupportedException
Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.