return initializer;
}
public CtClassCache createCache()
{
CachePolicy policy = null;
if (policyClass == TimedCachePolicy.class)
policy = new TimedCachePolicy(lifetime, true, resolution);
else if (policyClass == LRUCachePolicy.class)
policy = new LRUCachePolicy(min, max);
else
{
try
{
policy = policyClass.newInstance();
}
catch(Exception e)
{
throw new IllegalStateException("Could not instantiate " + policyClass.getName(), e);
}
}
try
{
policy.create();
policy.start();
}
catch(Exception e)
{
throw new IllegalStateException("Error starting domain cache", e);
}