Package com.volantis.mcs.policies

Examples of com.volantis.mcs.policies.CacheControl


        CacheControlConstraints constraints = new CacheControlConstraints(configuration);
        CacheControlBuilder builder = policyFactory.createCacheControlBuilder();
        builder.setRetryMaxCount(50);
        constraints.applyConstraints(builder);

        CacheControl cacheControl = builder.getCacheControl();
        assertEquals(50, cacheControl.getRetryMaxCount());
    }
View Full Code Here


        RemotePolicyCacheConfiguration configuration =
                new RemotePolicyCacheConfiguration();
        configuration.setMaxTimeToLive(new Integer(100));
        configuration.setDefaultTimeToLive(new Integer(150));
        CacheControlConstraints constraints = new CacheControlConstraints(configuration);
        CacheControl cacheControl = constraints.getDefaultCacheControl();

        assertEquals(100, cacheControl.getTimeToLive());
    }
View Full Code Here

        RemotePolicyCacheConfiguration configuration =
                new RemotePolicyCacheConfiguration();
        configuration.setMaxTimeToLive(new Integer(100));
        configuration.setDefaultTimeToLive(new Integer(50));
        CacheControlConstraints constraints = new CacheControlConstraints(configuration);
        CacheControl cacheControl = constraints.getDefaultCacheControl();

        assertEquals(50, cacheControl.getTimeToLive());
    }
View Full Code Here

        CacheControlConstraints constraints = new CacheControlConstraints(configuration);
        CacheControlBuilder builder = policyFactory.createCacheControlBuilder();
        builder.setTimeToLive(150);
        constraints.applyConstraints(builder);

        CacheControl cacheControl = builder.getCacheControl();
        assertEquals(100, cacheControl.getTimeToLive());
    }
View Full Code Here

        CacheControlConstraints constraints = new CacheControlConstraints(configuration);
        CacheControlBuilder builder = policyFactory.createCacheControlBuilder();
        builder.setTimeToLive(50);
        constraints.applyConstraints(builder);

        CacheControl cacheControl = builder.getCacheControl();
        assertEquals(50, cacheControl.getTimeToLive());
    }
View Full Code Here

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

        CacheControl cacheControl = createCacheControl(true, true, true, 2, 1,
                5);

        CachedPolicyState state = new CachedPolicyState(clockMock, cacheControl,
                policyMock);
View Full Code Here

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

        CacheControl cacheControl = createCacheControl(true, true, true, 2, 1,
                0);

        CachedPolicyState state = new CachedPolicyState(clockMock, cacheControl,
                policyMock);
View Full Code Here

        builder.setRetainDuringRetry(retainDuringRetry);
        builder.setRetryFailedRetrieval(retryFailedRetrieval);
        builder.setRetryInterval(retryInterval);
        builder.setRetryMaxCount(retryMaxCount);
        builder.setTimeToLive(timeToLive);
        CacheControl cacheControl = builder.getCacheControl();
        return cacheControl;
    }
View Full Code Here

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

        CacheControl cacheControl = createCacheControl(true, true, true, 2, 1,
                5);

        CachedPolicyState state = new CachedPolicyState(clockMock, cacheControl,
                null);
View Full Code Here

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

        CacheControl cacheControl = createCacheControl(true, false, false, 0, 0,
                5);

        CachedPolicyState state = new CachedPolicyState(clockMock, cacheControl,
                policyMock);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.policies.CacheControl

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.