synchronized public void start() throws Exception { delegate.start(); }
public void start() throws Exception { getCache().start(); } /* From Service interface*/
/** * Create cache policy. * * @return the cache policy */ protected CachePolicy createCachePolicy() { try { CachePolicy policy = factory.createCachePolicy(); policy.create(); policy.start(); policies.add(policy); return policy; } catch (Exception e) { if (e instanceof RuntimeException) throw (RuntimeException)e; else throw new RuntimeException(e); } }
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); } return new CtClassCache(policy); }
public ClassReaderCache 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); } return new ClassReaderCache(policy); }