public void setConfiguration(Configuration conf) { _log = conf.getLog(OpenJPAConfiguration.LOG_RUNTIME); _mgr = ((OpenJPAConfiguration)conf).getDataCacheManagerInstance(); }
/** * Return the data cache for this class, or null if it is not cachable. */ public DataCache getDataCache() { String name = getDataCacheName(); if (name == null) { return null; } return _repos.getConfiguration().getDataCacheManagerInstance().getDataCache(name, true); }
public void setContext(StoreContext ctx) { _ctx = ctx; _mgr = ctx.getConfiguration().getDataCacheManagerInstance(); _gen = _mgr.getPCDataGenerator(); super.setContext(ctx); }
public void setContext(StoreContext ctx) { _ctx = ctx; _gen = ctx.getConfiguration().getDataCacheManagerInstance(). getPCDataGenerator(); super.setContext(ctx); }
/** * Return the data cache for this class, or null if it is not cachable. */ public DataCache getDataCache() { String name = getDataCacheName(); if (name == null) return null; return _repos.getConfiguration().getDataCacheManagerInstance(). getDataCache(name, true); }
/** * Return the data cache for this class, or null if it is not cachable. */ public DataCache getDataCache() { String name = getDataCacheName(); if (name == null) { return null; } return _repos.getConfiguration().getDataCacheManagerInstance().getDataCache(name, true); }
public void setContext(StoreContext ctx) { _ctx = ctx; _mgr = ctx.getConfiguration().getDataCacheManagerInstance(); _gen = _mgr.getPCDataGenerator(); super.setContext(ctx); }
public StoreCache getStoreCache(String cacheName) { return new StoreCacheImpl(this, _factory.getConfiguration(). getDataCacheManagerInstance().getDataCache(cacheName, true)); }
public StoreCache getStoreCache(String cacheName) { return new StoreCacheImpl(this, _factory.getConfiguration(). getDataCacheManagerInstance().getDataCache(cacheName, true)); }
/** * Return the data cache for this class, or null if it is not cachable. */ public DataCache getDataCache() { String name = getDataCacheName(); if (name == null) { return null; } return _repos.getConfiguration().getDataCacheManagerInstance().getDataCache(name, true); }
public StoreQuery newQuery(String language) { StoreQuery sq = newStoreQuery(language); if (sq == null || QueryLanguages.parserForLanguage(language) == null) { return sq; } QueryCache queryCache = _ctx.getConfiguration().getDataCacheManagerInstance().getSystemQueryCache(); if (queryCache == null) { return sq; } return new QueryCacheStoreQuery(sq, queryCache); }
public StoreQuery newQuery(String language) { StoreQuery q = super.newQuery(language); // if the query can't be parsed or it's using a non-parsed language // (one for which there is no ExpressionParser), we can't cache it. if (q == null || QueryLanguages.parserForLanguage(language) == null) return q; QueryCache queryCache = _ctx.getConfiguration(). getDataCacheManagerInstance().getSystemQueryCache(); if (queryCache == null) return q; return new QueryCacheStoreQuery(q, queryCache); }
public QueryResultCache getQueryResultCache() { _factory.lock(); try { if (_queryCache == null) _queryCache = new QueryResultCacheImpl(_factory. getConfiguration().getDataCacheManagerInstance(). getSystemQueryCache()); return _queryCache; } finally { _factory.unlock(); } }
public StoreQuery newQuery(String language) { StoreQuery sq = newStoreQuery(language); if (sq == null || QueryLanguages.parserForLanguage(language) == null) { return sq; } QueryCache queryCache = _ctx.getConfiguration().getDataCacheManagerInstance().getSystemQueryCache(); if (queryCache == null) { return sq; } return new QueryCacheStoreQuery(sq, queryCache); }
public QueryResultCache getQueryResultCache() { _factory.lock(); try { if (_queryCache == null) _queryCache = new QueryResultCacheImpl(_factory. getConfiguration().getDataCacheManagerInstance(). getSystemQueryCache()); return _queryCache; } finally { _factory.unlock(); } }
public StoreCache getStoreCache() { _factory.lock(); try { if (_cache == null) { OpenJPAConfiguration conf = _factory.getConfiguration(); _cache = new StoreCacheImpl(this, conf.getDataCacheManagerInstance().getSystemDataCache()); } return _cache; } finally { _factory.unlock(); } }
public StoreCache getStoreCache() { _factory.lock(); try { if (_cache == null) { OpenJPAConfiguration conf = _factory.getConfiguration(); _cache = new StoreCacheImpl(this, conf.getDataCacheManagerInstance().getSystemDataCache()); } return _cache; } finally { _factory.unlock(); } }
public QueryResultCache getQueryResultCache() { _factory.lock(); try { if (_queryCache == null) _queryCache = new QueryResultCacheImpl(_factory. getConfiguration().getDataCacheManagerInstance(). getSystemQueryCache()); return _queryCache; } finally { _factory.unlock(); } }
@Override public void initialize() { OpenJPAConfiguration conf = (OpenJPAConfiguration)getProvider().getConfiguration(); DataCacheManager dcm = conf.getDataCacheManagerInstance(); QueryCache qc = dcm.getSystemQueryCache(); if (qc == null) { throw new UserException(_loc.get("query-cache-not-found")); } setQueryCache(qc); setConfigId(conf.getId()); setContextRef(Integer.toString(System.identityHashCode(getContext()))); }
@Override public void initialize() { OpenJPAConfiguration conf = (OpenJPAConfiguration)getProvider().getConfiguration(); DataCacheManager dcm = conf.getDataCacheManagerInstance(); QueryCache qc = dcm.getSystemQueryCache(); if (qc == null) { throw new UserException(_loc.get("query-cache-not-found")); } setQueryCache(qc); setConfigId(conf.getId()); setContextRef(Integer.toString(System.identityHashCode(getContext()))); }