Package com.volantis.cache.provider

Examples of com.volantis.cache.provider.CacheableObjectProvider


            cache.getRootGroup(), true,
            new PipelineCacheState(
                clock.getCurrentTime().addPeriod(Period.inSeconds(2))));
        async.update(result);

        CacheableObjectProvider cacheableObjectProvider =
            new ExpiredObjectsRemainExpiredCacheableObjectProvider(cache.getRootGroup());
        assertNotNull("Integer object is retrievable via the cache",
                cache.retrieve(cacheKey, cacheableObjectProvider));

        Thread.sleep(3000);
View Full Code Here


        final Group[] groups = new Group[21];

        factory = CacheFactory.getDefaultInstance();
        CacheBuilder builder = factory.createCacheBuilder();
        builder.setMaxCount(40);
        builder.setObjectProvider(new CacheableObjectProvider() {
            public ProviderResult retrieve(
                    SystemClock clock, Object key, CacheEntry entry) {
                Key k = (Key) key;

                // The first key is always uncacheable.
View Full Code Here

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        CacheableObjectProvider objectProvider = new TestCacheableObjectProvider();

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

TOP

Related Classes of com.volantis.cache.provider.CacheableObjectProvider

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.