Package com.sun.appserv.util.cache

Examples of com.sun.appserv.util.cache.Cache


     */
    public int doStartTag()
        throws JspException
    {
        // get the cache from the specified scope
        Cache cache = CacheUtil.getCache(pageContext, _scope);

        // generate the cache key using the user specified key.
  
        if (_key != null) {
            String key = CacheUtil.generateKey(_key, pageContext);

            // remove the entry for the key
            cache.remove(key);

            if (_logger.isLoggable(Level.FINE))
                _logger.log(Level.FINE, FLUSH_TAG_CLEAR_KEY, key);
        } else {
            // clear the entire cache
            cache.clear();

            if (_logger.isLoggable(Level.FINE))
                _logger.log(Level.FINE, FLUSH_TAG_CLEAR_CACHE);
        }

View Full Code Here


        // use the context class loader to load class so that any
        // user-defined classes in WEB-INF can also be loaded.
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        Class cacheClass = cl.loadClass(className);

        Cache cacheImpl = (Cache)cacheClass.newInstance();
        cacheImpl.init(maxEntries, cacheProps);

        return cacheImpl;
    }
View Full Code Here

TOP

Related Classes of com.sun.appserv.util.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.