Package org.apache.archiva.redback.components.cache

Examples of org.apache.archiva.redback.components.cache.Cache


            // Setup some defaults.
            hints = new CacheHints();
            hints.setName( id );
        }

        Cache cache = CacheFactory.creator.createCache( hints );

        caches.put( id, cache );
        return (Cache) cache;
    }
View Full Code Here


    @Override
    public Boolean clearCache( String cacheKey )
        throws ArchivaRestServiceException
    {
        Cache cache = caches.get( cacheKey );
        if ( cache == null )
        {
            throw new ArchivaRestServiceException( "no cache for key: " + cacheKey,
                                                   Response.Status.BAD_REQUEST.getStatusCode(), null );
        }

        cache.clear();
        return Boolean.TRUE;
    }
View Full Code Here

   
    public String flush()
    {
        if( !StringUtils.isEmpty( cacheKey ) )
        {
            Cache cache = caches.get( cacheKey );
            cache.clear();
        }

        return SUCCESS;
    }
View Full Code Here

    }

    public Boolean clearCache( String cacheKey )
        throws ArchivaRestServiceException
    {
        Cache cache = caches.get( cacheKey );
        if ( cache == null )
        {
            throw new ArchivaRestServiceException( "no cache for key: " + cacheKey,
                                                   Response.Status.BAD_REQUEST.getStatusCode(), null );
        }

        cache.clear();
        return Boolean.TRUE;
    }
View Full Code Here

    }

    public Boolean clearCache( String cacheKey )
        throws ArchivaRestServiceException
    {
        Cache cache = caches.get( cacheKey );
        if ( cache == null )
        {
            throw new ArchivaRestServiceException( "no cache for key: " + cacheKey,
                                                   Response.Status.BAD_REQUEST.getStatusCode(), null );
        }

        cache.clear();
        return Boolean.TRUE;
    }
View Full Code Here

TOP

Related Classes of org.apache.archiva.redback.components.cache.Cache

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.