Package org.apache.jetspeed.cache

Examples of org.apache.jetspeed.cache.ContentCacheKey


        }
    }
   
    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);
    }
View Full Code Here


        return (int)ehcache.getTimeToLiveSeconds();
    }

    public boolean isKeyInCache(Object key)
    {
        ContentCacheKey cckey = (ContentCacheKey)key;       
        return ehcache.isKeyInCache(cckey.getKey());
    }
View Full Code Here

        }       
    }
   
    public CacheElement createElement(Object key, Object content)
    {
        ContentCacheKey cckey = (ContentCacheKey)key;
        Element cachedElement = new Element(cckey.getKey(), content);       
        return new EhPortletContentCacheElementImpl(cachedElement, cckey);
    }
View Full Code Here

            if (map != null)
            {
                Iterator entities = map.values().iterator();
                while (entities.hasNext())
                {
                    ContentCacheKey ccKey = (ContentCacheKey)entities.next();
                    ehcache.remove(ccKey.getKey());
                }
            }
            ehcache.remove(username);
        }
    }
View Full Code Here

            if (map != null)
            {
                Iterator entities = map.values().iterator();
                while (entities.hasNext())
                {
                    ContentCacheKey ccKey = (ContentCacheKey)entities.next();
                    ehcache.remove(ccKey.getKey());
                }
            }
            ehcache.remove(session);
        }
    }
View Full Code Here

    protected boolean retrieveCachedContent(RequestContext requestContext, ContentFragment fragment,
                                            PortletWindow portletWindow, int expiration,
                                            PortletDefinitionComposite portletDefinition)
        throws Exception
    {
        ContentCacheKey cacheKey = portletContentCache.createCacheKey(requestContext, fragment.getId());       
        CacheElement cachedElement = portletContentCache.get(cacheKey);
        if (cachedElement != null)
        {
            PortletContent portletContent = (PortletContent)cachedElement.getContent();           
            fragment.setPortletContent(portletContent);
View Full Code Here

        return false;
    }
   
    public ContentDispatcherCtrl createDispatcher(RequestContext request, ContentFragment fragment, int expirationCache)
    {
        ContentCacheKey cacheKey = portletContentCache.createCacheKey(request, fragment.getId());               
        PortletContent content = new PortletContentImpl(this, cacheKey, expirationCache);
        ContentDispatcherCtrl dispatcher = new ContentDispatcherImpl(content);
        return dispatcher;
    }
View Full Code Here

                {
                    notifyFragments((ContentFragment)child, context, page);
                }
            }
        }   
        ContentCacheKey cacheKey = portletContentCache.createCacheKey(context, f.getId());
        if (portletContentCache.isKeyInCache(cacheKey))
        {
            portletContentCache.remove(cacheKey);
            portletContentCache.invalidate(context);
        }
View Full Code Here

        clearTargetCache(f.getId(), context);
    }
   
    protected void clearTargetCache(String fragmentId, RequestContext context)
    {
        ContentCacheKey cacheKey = portletContentCache.createCacheKey(context, fragmentId);
       
        if (portletContentCache.isKeyInCache(cacheKey))
        {
            portletContentCache.remove(cacheKey);
            portletContentCache.invalidate(context);
View Full Code Here

   
    protected void removeFromCache(RequestContext context, String id, JetspeedContentCache cache)
    {
        if (cache == null)
            return;
        ContentCacheKey cacheKey = cache.createCacheKey(context, id);
        if (cache.isKeyInCache(cacheKey))
        {
            cache.remove(cacheKey);
        }
        cache.invalidate(context);
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.cache.ContentCacheKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.