Package com.volantis.cache

Examples of com.volantis.cache.CacheBuilder.buildCache()


            cacheBuilder.setMaxCount(maxEntries);
            final SystemClock clock = SystemClock.getDefaultInstance();
            cacheBuilder.setClock(clock);
            cacheBuilder.setExpirationChecker(
                new URLContentValidationChecker());
            cache = cacheBuilder.buildCache();
        } else {
            cache = null;
        }
        cacheInitialized = true;
    }
View Full Code Here


            final CacheBuilder cacheBuilder =
                CacheFactory.getDefaultInstance().createCacheBuilder();
            cacheBuilder.setMaxCount(maxCount);
            cacheBuilder.setClock(clock);
            cacheBuilder.setExpirationChecker(new URLContentValidationChecker());
            cache = cacheBuilder.buildCache();
        }

        final URLContentManagerConfiguration config =
            new URLContentManagerConfiguration();
        config.setDefaultTimeout(timeout);
View Full Code Here

        CacheableObjectProvider objectProvider = new TestCacheableObjectProvider();

        CacheBuilder builder = new CacheBuilderImpl();
        builder.setObjectProvider(objectProvider);
        builder.setMaxCount(8);
        Cache cache = builder.buildCache();

        GroupBuilder groupBuilder = new GroupBuilderImpl();
        groupBuilder.setMaxCount(4);
        Group root = cache.getRootGroup();
        root.addRemovalListener(listenerRootMock);
View Full Code Here

        Cache cache;
        synchronized (caches) {
            CacheBuilder cacheBuilder = CACHE_FACTORY.createCacheBuilder();
            cacheBuilder.setMaxCount(maxCount);
            cacheBuilder.setExpirationChecker(EXPIRATION_CHECKER);
            cache = cacheBuilder.buildCache();
            caches.put(name, cache);
        }

        final Period ttl;
        if ("unlimited".equals(maxAge)) {
View Full Code Here

        CacheBuilder builder = factory.createCacheBuilder();
        builder.setMaxCount(totalSize);
        builder.setExpirationChecker(new PolicyExpirationChecker());
        builder.setClock(clock);
        cache = builder.buildCache();

        Group root = getRootGroup();

        GroupBuilder groupBuilder;
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.