Package com.volantis.cache

Examples of com.volantis.cache.AsyncResult.update()


        final SystemClock clock = SystemClock.getDefaultInstance();
        ProviderResult result = new ProviderResult(new Integer(1),
            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));
View Full Code Here


                    async.failed(throwable);
                } else {
                    // the cache must be updated even if the result has a
                    // non-null throwable
                                       
                    value = async.update(result);

                    // if the result has a throwable, thow it wrapped inside a
                    // runtime exception
                    Throwable cause = result.getThrowable();
                    if (cause != null) {
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.