public ContentCacheKey createSessionCacheKey(String sessionId, String pipeline, String windowId) { ContentCacheKey key = new JetspeedContentCacheKey(); key.createFromSession(sessionId, pipeline, windowId); return key; }
public ContentCacheKey createUserCacheKey(String username, String pipeline, String windowId) { ContentCacheKey key = new JetspeedContentCacheKey(); key.createFromUser(username, pipeline, windowId); return key; }
public boolean isKeyInCache(Object key) { ContentCacheKey cckey = (ContentCacheKey)key; return ehcache.isKeyInCache(cckey.getKey()); }
public boolean remove(Object key) { CacheElement element = this.get(key); boolean removed = false; if (element == null) return false; ContentCacheElement ccElement = (ContentCacheElement)element; EhPortletContentCacheElementImpl impl = (EhPortletContentCacheElementImpl)element; Element ehl = impl.getImplElement(); String userKey = ccElement.getContentCacheKey().getSessionId(); if (userKey == null) { userKey = ccElement.getContentCacheKey().getUsername(); } String windowId = ccElement.getContentCacheKey().getWindowId(); removed = ehcache.remove(ccElement.getContentCacheKey().getKey()); Element userElement = ehcache.get(userKey); if (userElement != null) { Map map = (Map)userElement.getObjectValue(); if (map != null) { map.remove(windowId); } } return removed; }
EhPortletContentCacheElementImpl impl = (EhPortletContentCacheElementImpl)element; Element ehl = impl.getImplElement(); String userKey = ccElement.getContentCacheKey().getSessionId(); if (userKey == null) userKey = ccElement.getContentCacheKey().getUsername(); String windowId = ccElement.getContentCacheKey().getWindowId(); try
@SuppressWarnings("unchecked") public void registerPortletContentCachedForPublicRenderParameters(RequestContext context, PortletContent content) String windowId = content.getCacheKey().getWindowId(); PortletWindowRequestNavigationalState state = requestStates.getPortletWindowNavigationalState(windowId); if (state != null && state.getPublicRenderParametersMap() != null && !state.getPublicRenderParametersMap().isEmpty())
public boolean remove(Object key) { CacheElement element = this.get(key); boolean removed = false; if (element == null) return false; ContentCacheElement ccElement = (ContentCacheElement)element; EhDecorationContentCacheElementImpl impl = (EhDecorationContentCacheElementImpl)element; Element ehl = impl.getImplElement(); String userKey = ccElement.getContentCacheKey().getSessionId(); if (userKey == null) { userKey = ccElement.getContentCacheKey().getUsername(); } String windowId = ccElement.getContentCacheKey().getWindowId(); removed = ehcache.remove(ccElement.getContentCacheKey().getKey()); Element userElement = ehcache.get(userKey); if (userElement != null) { Map map = (Map)userElement.getObjectValue(); if (map != null) { map.remove(windowId); } } return removed; }
EhDecorationContentCacheElementImpl impl = (EhDecorationContentCacheElementImpl)element; Element ehl = impl.getImplElement(); String userKey = ccElement.getContentCacheKey().getSessionId(); if (userKey == null) userKey = ccElement.getContentCacheKey().getUsername(); String windowId = ccElement.getContentCacheKey().getWindowId(); try
public CacheElement createElement(Object key, Object content) { ContentCacheKey cckey = (ContentCacheKey)key; Element cachedElement = new Element(cckey.getKey(), content); return new EhDecorationContentCacheElementImpl(cachedElement, cckey); }
public boolean isKeyInCache(Object key) { ContentCacheKey cckey = (ContentCacheKey)key; return ehcache.isKeyInCache(cckey.getKey()); }
public CacheElement createElement(Object key, Object content) { ContentCacheKey cckey = (ContentCacheKey)key; Element cachedElement = new Element(cckey.getKey(), content); return new EhPortletContentCacheElementImpl(cachedElement, cckey); }
public void evictContentForUser(String username) { Element userElement = saveGet(username); if (userElement != null) { Map map = (Map)userElement.getObjectValue(); if (map != null) { Iterator entities = map.values().iterator(); while (entities.hasNext()) { ContentCacheKey ccKey = (ContentCacheKey)entities.next(); ehcache.remove(ccKey.getKey()); } } ehcache.remove(username); } }
public CacheElement get(Object key) { ContentCacheKey cckey = (ContentCacheKey)key; Element element = ehcache.get(cckey.getKey()); if (element == null) return null; return new EhDecorationContentCacheElementImpl(element, cckey); }
public CacheElement get(Object key) { ContentCacheKey cckey = (ContentCacheKey)key; Element element = ehcache.get(cckey.getKey()); if (element == null) return null; return new EhPortletContentCacheElementImpl(element, cckey); }
public void evictContentForSession(String session) { Element userElement = saveGet(session); if (userElement != null) { Map map = (Map)userElement.getObjectValue(); if (map != null) { Iterator entities = map.values().iterator(); while (entities.hasNext()) { ContentCacheKey ccKey = (ContentCacheKey)entities.next(); ehcache.remove(ccKey.getKey()); } } ehcache.remove(session); } }
public void evictContentForUser(String username) { Element userElement = saveGet(username); if (userElement != null) { Map map = (Map)userElement.getObjectValue(); if (map != null) { Iterator entities = map.values().iterator(); while (entities.hasNext()) { ContentCacheKey ccKey = (ContentCacheKey)entities.next(); ehcache.remove(ccKey.getKey()); } } ehcache.remove(username); } }
public void evictContentForSession(String session) { Element userElement = saveGet(session); if (userElement != null) { Map map = (Map)userElement.getObjectValue(); if (map != null) { Iterator entities = map.values().iterator(); while (entities.hasNext()) { ContentCacheKey ccKey = (ContentCacheKey)entities.next(); ehcache.remove(ccKey.getKey()); } } ehcache.remove(session); } }
void removeUserEntry(String username, String pipeline, String windowId) { ContentCacheKey key = keyGenerator.createUserCacheKey(username, pipeline, windowId); if (ehcache.remove(key.getKey())) { Element userElement = ehcache.get(username); if (userElement != null) { Map map = (Map)userElement.getObjectValue(); if (map != null) { map.remove(windowId); } } } }
void removeUserEntry(String username, String pipeline, String windowId) { ContentCacheKey key = keyGenerator.createUserCacheKey(username, pipeline, windowId); if (ehcache.remove(key.getKey())) { Element userElement = ehcache.get(username); if (userElement != null) { Map map = (Map)userElement.getObjectValue(); if (map != null) { map.remove(windowId); } } } }