Examples of MemoryCache


Examples of org.apache.jcs.engine.memory.MemoryCache

    /* (non-Javadoc)
     * @see org.apache.excalibur.store.Store#keys()
     */
    public Enumeration keys() {
        // TODO Find a better way
        final MemoryCache memoryCache = this.cacheManager.getCache(region).getMemoryCache();
        final Object[] keys = memoryCache.getKeyArray();
        return new IteratorEnumeration(Arrays.asList(keys).iterator());
        //return new IteratorEnumeration(this.jcs.getGroupKeys("").iterator());
    }
View Full Code Here

Examples of org.apache.jcs.engine.memory.MemoryCache

    /* (non-Javadoc)
     * @see org.apache.excalibur.store.Store#size()
     */
    public int size() {
        // TODO Find a better way
        MemoryCache memoryCache = this.cacheManager.getCache(region).getMemoryCache();
        return memoryCache.getSize();
        //return this.jcs.getSize();
    }
View Full Code Here

Examples of org.apache.jcs.engine.memory.MemoryCache

    /* (non-Javadoc)
     * @see org.apache.excalibur.store.Store#free()
     */
    public void free() {
        // TODO Find a better way
        MemoryCache memoryCache = this.cacheManager.getCache(region).getMemoryCache();
        Object[] keys = memoryCache.getKeyArray();
        if ( keys != null && keys.length > 0 ) {
            final Object key = keys[0];
            try {
                memoryCache.remove((Serializable)key);
            } catch (Exception ignore) {               
            }
        }
    }
View Full Code Here

Examples of org.apache.jcs.engine.memory.MemoryCache

    /* (non-Javadoc)
     * @see org.apache.excalibur.store.Store#keys()
     */
    public Enumeration keys() {
        // TODO Find a better way
        final MemoryCache memoryCache = this.cacheManager.getCache(region).getMemoryCache();
        final Object[] keys = memoryCache.getKeyArray();
        return new IteratorEnumeration(Arrays.asList(keys).iterator());
        //return new IteratorEnumeration(this.jcs.getGroupKeys("").iterator());
    }
View Full Code Here

Examples of org.apache.jcs.engine.memory.MemoryCache

    /* (non-Javadoc)
     * @see org.apache.excalibur.store.Store#size()
     */
    public int size() {
        // TODO Find a better way
        MemoryCache memoryCache = this.cacheManager.getCache(region).getMemoryCache();
        return memoryCache.getSize();
        //return this.jcs.getSize();
    }
View Full Code Here

Examples of org.g4studio.core.resource.cache.MemoryCache

   */
  private Cache createCache() throws ConfigeException {
    String cacheName = properites.getProperty(CACHE_KEY);
    if (isEmpty(cacheName)) {
      logger.info("没有发现cache配置,采用默认的MemoryCache");
      return new MemoryCache();
    }
    return (Cache) this.createObject(cacheName + ".", Cache.class);
  }
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.