public void clear() { // invoke removeAll with local flag set synchronized (refList) { removeAllLocal = true; super.clear(); removeAllLocal = false; } notifyListeners(true, CacheElement.ActionRemoved,null,null); }
@Override public void putDomain(Long id, Object domain) { domainCache.put(new EhCacheDistributedElementImpl(id, (DistributedCacheObject) domain)); }
@Override public Object getPermission(Long id) { EhCacheDistributedElementImpl cacheElementImpl = (EhCacheDistributedElementImpl)permissionCache.get(id); return ((cacheElementImpl != null) ? cacheElementImpl.getContent() : null); }
public void createFromUser(String username, String pipeline, String windowId) { this.setUsername(username); this.setPipeline(pipeline); this.setWindowId(windowId); this.key = this.getUsername() + EhPortletContentCacheElementImpl.KEY_SEPARATOR + this.getPipeline() + EhPortletContentCacheElementImpl.KEY_SEPARATOR + this.getWindowId(); }
public void createFromSession(String sessionId, String pipeline, String windowId) { this.setSessionId(sessionId); this.setPipeline(pipeline); this.setWindowId(windowId); this.key = this.getSessionId() + EhPortletContentCacheElementImpl.KEY_SEPARATOR + this.getPipeline() + EhPortletContentCacheElementImpl.KEY_SEPARATOR + this.getWindowId(); }
public static synchronized EhCacheConfigResource getInstance(String defaultConfigResource, boolean test) { // construct and return a default or new instance if (test || (instance == null)) { EhCacheConfigResource newInstance = new EhCacheConfigResource(); newInstance.setDefaultConfigResource(defaultConfigResource); newInstance.setTest(test); newInstance.afterPropertiesSet(); } return instance; }
public CacheElement get(Object key) { return get((Serializable)key); }
public void notifyElementRemoved(Ehcache cache, Element arg1) throws CacheException { notifyElement(cache, false, arg1,CacheElement.ActionRemoved); }
public List<CacheMonitorState> snapshotStatistics() { return snapshotAndCalculateStatistics(false) ; }
public ContentCacheKey createCacheKey(RequestContext context, String windowId) { ContentCacheKey key = new JetspeedContentCacheKey(segments, context, windowId); return key; }
public void notifyElementExpired(JetspeedCache cache, boolean local, Object key, Object element) { notifyElementRemoved(cache,local,key,element); }
@Override public boolean isDistributed() { // return distributed status for instance caches return (principalCache.isDistributed() && permissionCache.isDistributed() && domainCache.isDistributed()); }
@Override public Object getDomain(Long id) { EhCacheDistributedElementImpl cacheElementImpl = (EhCacheDistributedElementImpl)domainCache.get(id); return ((cacheElementImpl != null) ? cacheElementImpl.getContent() : null); }
@Override public void putPermission(Long id, Object permission) { permissionCache.put(new EhCacheDistributedElementImpl(id, (DistributedCacheObject) permission)); }
public void notifyElementUpdated(Ehcache cache, Element arg1) throws CacheException { notifyElement(cache, false,arg1,CacheElement.ActionChanged); } public void notifyRemoveAll(Ehcache cache)
public CacheMonitorState calculateStatistics(String cacheName) { return snapshotAndCalculateStatistics(cacheName, true); }
@Override public Object getPrincipal(Long id) { EhCacheDistributedElementImpl cacheElementImpl = (EhCacheDistributedElementImpl)principalCache.get(id); return ((cacheElementImpl != null) ? cacheElementImpl.getContent() : null); }
@Override public void putPrincipal(Long id, Object principal) { principalCache.put(new EhCacheDistributedElementImpl(id, (DistributedCacheObject) principal)); }
public void notifyElementPut(Ehcache cache, Element arg1) throws CacheException { notifyElement(cache, false, arg1, CacheElement.ActionAdded); }
public List<CacheMonitorState> calculateStatistics() { return snapshotAndCalculateStatistics(true); }