org.jboss.cache.eviction
Class ElementSizeAlgorithmConfig
java.lang.Object
org.jboss.cache.config.ConfigurationComponent
org.jboss.cache.eviction.EvictionAlgorithmConfigBase
org.jboss.cache.eviction.ElementSizeAlgorithmConfig
- All Implemented Interfaces:
- Serializable, Cloneable, CloneableConfigurationComponent, EvictionAlgorithmConfig
public class ElementSizeAlgorithmConfig
- extends EvictionAlgorithmConfigBase
Configuration for ElementSizeAlgorithm
.
Requires a positive "maxElementsPerNode" value otherwise a ConfigurationException is thrown.
- Since:
- 3.0
- Author:
- Manik Surtani
- See Also:
- Serialized Form
ElementSizeAlgorithmConfig
public ElementSizeAlgorithmConfig()
ElementSizeAlgorithmConfig
public ElementSizeAlgorithmConfig(int maxNodes,
int maxElementsPerNode)
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 EvictionAlgorithmConfig
- Overrides:
validate
in class EvictionAlgorithmConfigBase
- 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 EvictionAlgorithmConfigBase
hashCode
public int hashCode()
- Overrides:
hashCode
in class EvictionAlgorithmConfigBase
reset
public void reset()
- Description copied from interface:
EvictionAlgorithmConfig
- Resets the values to their defaults.
- Specified by:
reset
in interface EvictionAlgorithmConfig
- Overrides:
reset
in class EvictionAlgorithmConfigBase
clone
public ElementSizeAlgorithmConfig clone()
throws CloneNotSupportedException
- Specified by:
clone
in interface CloneableConfigurationComponent
- Specified by:
clone
in interface EvictionAlgorithmConfig
- Overrides:
clone
in class EvictionAlgorithmConfigBase
- Returns:
- a clone of the EvictionAlgorithmConfig.
- Throws:
CloneNotSupportedException
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.