public DataCache getSystemDataCache() { return getDataCache(null, false); }
/** * Affirms if the given type is eligible for cache. */ public boolean isCachable(ClassMetaData meta) { Boolean res = _cacheable.get(meta); if(res != null){ return res; } Boolean isCachable = isCacheableByMode(meta); if (isCachable == null) { isCachable = isCacheableByType(meta); } _cacheable.put(meta, isCachable); return isCachable; }
/** * * @return */ public EhCacheDataCache getSystemDataCache() { return ((EhCacheDataCache) super.getSystemDataCache()); }
/** * Select cache for the given managed instance. * If type based verification affirms the type to be cached then the instance based policy * is called to determine the target cache. */ public DataCache selectCache(OpenJPAStateManager sm) { if (sm == null || !isCachable(sm.getMetaData())) return null; String name = _policy.selectCache(sm, null); return name == null ? null : getDataCache(name); }
public void initialize(DataCacheManager manager) { if (_schedule != null && !"".equals(_schedule)) { ClearableScheduler scheduler = manager.getClearableScheduler(); if (scheduler != null) scheduler.scheduleEviction(this, _schedule); } // Cast here rather than add to the interface because this is a hack to support an older way of configuring if(manager instanceof DataCacheManagerImpl){ List<String> invalidConfigured = new ArrayList<String>(); // assert that things are configured properly if(_includedTypes!=null){ for(String s : _includedTypes){ if(_excludedTypes.contains(s)){ invalidConfigured.add(s); } } if (invalidConfigured.size() > 0) { throw new GeneralException(s_loc.get("invalid-types-excluded-types", invalidConfigured.toString())); } } ((DataCacheManagerImpl)manager).setTypes(_includedTypes, _excludedTypes); } }
/** * Select cache for the given managed instance. * If type based verification affirms the type to be cached then the instance based policy * is called to determine the target cache. */ public DataCache selectCache(OpenJPAStateManager sm) { if (sm == null || !isCachable(sm.getMetaData())) return null; String name = _policy.selectCache(sm, null); return name == null ? null : getDataCache(name); }
public void initialize(DataCacheManager manager) { if (_schedule != null && !"".equals(_schedule)) { ClearableScheduler scheduler = manager.getClearableScheduler(); if (scheduler != null) scheduler.scheduleEviction(this, _schedule); } // Cast here rather than add to the interface because this is a hack to support an older way of configuring if(manager instanceof DataCacheManagerImpl){ List<String> invalidConfigured = new ArrayList<String>(); // assert that things are configured properly if(_includedTypes!=null){ for(String s : _includedTypes){ if(_excludedTypes.contains(s)){ invalidConfigured.add(s); } } if (invalidConfigured.size() > 0) { throw new GeneralException(s_loc.get("invalid-types-excluded-types", invalidConfigured.toString())); } } ((DataCacheManagerImpl)manager).setTypes(_includedTypes, _excludedTypes); } }
/** * Select cache for the given managed instance. * If type based verification affirms the type to be cached then the instance based policy * is called to determine the target cache. */ public DataCache selectCache(OpenJPAStateManager sm) { if (sm == null || !isCachable(sm.getMetaData())) return null; String name = _policy.selectCache(sm, null); return name == null ? null : getDataCache(name); }
public DataCache getDataCache(String name) { return getDataCache(name, false); }
/** * Affirms if the given type is eligible for cache. */ public boolean isCachable(ClassMetaData meta) { Boolean res = _cacheable.get(meta); if(res != null){ return res; } Boolean isCachable = isCacheableByMode(meta); if (isCachable == null) { isCachable = isCacheableByType(meta); } _cacheable.put(meta, isCachable); return isCachable; }
public void initialize(DataCacheManager manager) { if (_schedule != null && !"".equals(_schedule)) { ClearableScheduler scheduler = manager.getClearableScheduler(); if (scheduler != null) scheduler.scheduleEviction(this, _schedule); } // Cast here rather than add to the interface because this is a hack to support an older way of configuring if(manager instanceof DataCacheManagerImpl){ List<String> invalidConfigured = new ArrayList<String>(); // assert that things are configured properly if(_includedTypes!=null){ for(String s : _includedTypes){ if(_excludedTypes.contains(s)){ invalidConfigured.add(s); } } if (invalidConfigured.size() > 0) { throw new GeneralException(s_loc.get("invalid-types-excluded-types", invalidConfigured.toString())); } } ((DataCacheManagerImpl)manager).setTypes(_includedTypes, _excludedTypes); } }
/** * Select cache for the given managed instance. * If type based verification affirms the type to be cached then the instance based policy * is called to determine the target cache. */ public DataCache selectCache(OpenJPAStateManager sm) { if (sm == null || !isCachable(sm.getMetaData())) return null; String name = _policy.selectCache(sm, null); return name == null ? null : getDataCache(name); }
public DataCache getSystemDataCache() { return getDataCache(null, false); }
/** * Affirms if the given type is eligible for cache. */ public boolean isCachable(ClassMetaData meta) { Boolean res = _cacheable.get(meta); if(res != null){ return res; } Boolean isCachable = isCacheableByMode(meta); if (isCachable == null) { isCachable = isCacheableByType(meta); } _cacheable.put(meta, isCachable); return isCachable; }
public void initialize(DataCacheManager manager) { if (_schedule != null && !"".equals(_schedule)) { ClearableScheduler scheduler = manager.getClearableScheduler(); if (scheduler != null) scheduler.scheduleEviction(this, _schedule); } // Cast here rather than add to the interface because this is a hack to support an older way of configuring if(manager instanceof DataCacheManagerImpl){ List<String> invalidConfigured = new ArrayList<String>(); // assert that things are configured properly if(_includedTypes!=null){ for(String s : _includedTypes){ if(_excludedTypes.contains(s)){ invalidConfigured.add(s); } } if (invalidConfigured.size() > 0) { throw new GeneralException(s_loc.get("invalid-types-excluded-types", invalidConfigured.toString())); } } ((DataCacheManagerImpl)manager).setTypes(_includedTypes, _excludedTypes); } }
public DataCache getDataCache(String name) { return getDataCache(name, false); }
/** * Affirms if the given type is eligible for cache. */ public boolean isCachable(ClassMetaData meta) { Boolean res = _cacheable.get(meta); if(res != null){ return res; } Boolean isCachable = isCacheableByMode(meta); if (isCachable == null) { isCachable = isCacheableByType(meta); } _cacheable.put(meta, isCachable); return isCachable; }
public DataCache getDataCache(String name) { return getDataCache(name, false); }
public DataCache getSystemDataCache() { return getDataCache(null, false); }
public DataCache getDataCache(String name) { return getDataCache(name, false); }