Examples of CacheRegion


Examples of net.sf.jportlet.service.cache.CacheRegion

        boolean             debug = _log.isDebugEnabled(  );
        CacheDescriptor     cache = _descriptor.getCacheDescriptor( request.getMode(  ) );
        String              id = getCacheableId( cache, request, response );
        PortletResponseImpl response2 = new PortletResponseImpl( this, request, response.getHttpResponse(  ) );
        String              body = null;
        CacheRegion         region = null;
        Cacheable           cacheable;

        /* Load the body from the cache */
        if ( id != null )
        {
            if ( debug )
            {
                _log.debug( "Loading portlet body from the cache.id=" + id );
            }

            region    = getCacheRegion(  );
            cacheable = region.get( id );
            if ( cacheable != null )
            {
                if ( !isDirty( request ) )
                {
                    if ( debug )
View Full Code Here

Examples of net.sf.jportlet.service.cache.CacheRegion

        if ( id != null )
        {
            PortletResponseImpl resp = ( PortletResponseImpl ) response;
            PortletDescriptor   descr = proxy.getDescriptor(  );
            CacheDescriptor     cache = descr.getCacheDescriptor( request.getMode(  ) );
            CacheRegion         region = getCacheService( proxy ).getRegion( descr.getName(  ), true );
            CacheableImpl       cacheable = new CacheableImpl( id, resp.getBuffer(  ).toString(  ), 1000 * cache.getExpires(  ) );

            if ( debug )
            {
                __log.debug( "Caching portlet content:" + id );
            }

            region.put( cacheable );
        }
    }
View Full Code Here

Examples of net.sf.jportlet.service.cache.CacheRegion

        }

        if ( id != null )
        {
            /* Get the cacheable object */
            CacheRegion region = getCacheService( proxy ).getRegion( proxy.getDescriptor(  ).getName(  ), true );
            Cacheable   cacheable = region.get( id );
            if ( cacheable != null )
            {
                if ( !proxy.isDirty( request ) )
                {
                    if ( debug )
View Full Code Here

Examples of org.fjank.jcache.CacheRegion

        if(key==null) throw new NullPointerException("This Map does not permit null keys.");
        return acc.isPresent(key);
    }

    public boolean containsValue(Object value) {
       CacheRegion region = acc.getRegion();
       return region.containsValue(value);
    }
View Full Code Here

Examples of org.fjank.jcache.CacheRegion

    }
    public Object remove(Object key, String group) {
        if (key==null || group==null) {
      throw new NullPointerException("This Map does not permit null keys.");
      }
        CacheRegion region = acc.getRegion();
        CacheGroup group2 = region.getGroup(group);
        if (group2 == null) {
            return null;
        }
        CacheObject object = (CacheObject) group2.get(key);
        if(object==null) {
View Full Code Here

Examples of org.fjank.jcache.CacheRegion

     *         variables which is null.
     */
    protected final String getRegion(final Object handle)
        throws CacheException {
        final CacheObject cacheObj = convertHandle(handle);
        final CacheRegion region = cacheObj.getRegion();
        if (region == null) {
            throw new NullObjectException("The object " + cacheObj
                + " is not attached to a region.");
        }
        final Object name = region.getName();
        if (name != null) {
            return name.toString();
        } else {
            return null;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.