throw new MissingPolicyException(
"There is no Eviction Policy Class specified on the region or for the entire cache!");
}
}
EvictionPolicy policy = null;
try
{
policy = (EvictionPolicy) Util.loadClass(evictionClass).newInstance();
}
catch (RuntimeException e)
{
throw e;
}
catch (Exception e)
{
throw new RuntimeException("Eviction class is not properly loaded in classloader", e);
}
EvictionPolicyConfig epc = null;
try
{
epc = policy.getEvictionConfigurationClass().newInstance();
}
catch (RuntimeException e)
{
throw e;
}
catch (Exception e)
{
throw new RuntimeException("Failed to instantiate eviction configuration of class " +
policy.getEvictionConfigurationClass(), e);
}
parseEvictionPolicyConfig(element, epc);
erc.setEvictionPolicyConfig(epc);