public void parseXMLConfig(Element element) throws ConfigureException
{
String name = element.getAttribute(EvictionConfiguration.NAME);
if (name == null || name.equals(""))
{
throw new ConfigureException("Name is required for the eviction region");
}
String maxNodes = XmlHelper.getAttr(element, EvictionConfiguration.MAX_NODES,
EvictionConfiguration.ATTR, EvictionConfiguration.NAME);
if (maxNodes != null && !maxNodes.equals(""))
{
setMaxNodes(Integer.parseInt(maxNodes));
}
else
{
setMaxNodes(0);
}
String timeToLive = XmlHelper.getAttr(element, EvictionConfiguration.TIME_TO_IDLE_SECONDS,
EvictionConfiguration.ATTR, EvictionConfiguration.NAME);
if (timeToLive == null)
{
timeToLive = XmlHelper.getAttr(element, EvictionConfiguration.TIME_TO_LIVE_SECONDS,
EvictionConfiguration.ATTR, EvictionConfiguration.NAME);
if (timeToLive == null)
throw new ConfigureException("LRUConfiguration.parseXMLConfig(): Null timeToLiveSeconds element");
}
setTimeToLiveSeconds(Integer.parseInt(timeToLive));
String maxAge = XmlHelper.getAttr(element, EvictionConfiguration.MAX_AGE_SECONDS,
EvictionConfiguration.ATTR, EvictionConfiguration.NAME);