Examples of LeastRecentlyUsedEvictionAlgorithm


Examples of org.wso2.carbon.clustering.hazelcast.jsr107.eviction.LeastRecentlyUsedEvictionAlgorithm

        CacheManager cacheManager = Caching.getCacheManagerFactory().getCacheManager("testLRUCacheEviction-manager");
        String cacheName = "testLRUCacheEviction";
        Cache<String, Integer> cache = cacheManager.getCache(cacheName);

        ((CacheImpl) cache).setCapacity(2);
        ((CacheImpl) cache).setEvictionAlgorithm(new LeastRecentlyUsedEvictionAlgorithm());

        String key1 = "key1";
        String key2 = "key2";
        String key3 = "key3";
        int value1 = 9876;
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.