Examples of LRUEvictionPolicy


Examples of org.apache.commons.cache.LRUEvictionPolicy

        Stash stash = inMemoryCache ? new MemoryStash(cacheSize) : new FileStash(Long.MAX_VALUE, cacheSize, new File[]{cacheTypeDirectory}, true);

        // eviction can't be used in testing as the policy creates a thread
        // which is only stopped on JVM exit, hence breaking the tests
        boolean isTestMode = "true".equals(SystemProperties.get("adito.testing", "false"));
        EvictionPolicy evictionPolicy = isTestMode ? null : new LRUEvictionPolicy();
       
        SimpleCache cache = new SimpleCache(stash, evictionPolicy, null, new GroupMapImpl());
        cache.registerStorageListener(getStorageListener(messageBundle, cacheFullText));
        return cache;
    }
View Full Code Here

Examples of org.geotools.caching.LRUEvictionPolicy

    public GridSpatialIndex(Region mbr, int gridsize, Storage store, int capacity) {
        this.gridsize = gridsize;
        this.mbr = mbr;
        this.store = store;
        this.stats = new GridSpatialIndexStatistics();
        this.policy = new LRUEvictionPolicy(this);
        this.featureCapacity = capacity;
       
        this.root = null;
       
        try{
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.