Package com.volantis.mcs.runtime.configuration

Examples of com.volantis.mcs.runtime.configuration.RemotePolicyCacheConfiguration


            throws Exception {

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        RemotePolicyCacheConfiguration configuration =
                new RemotePolicyCacheConfiguration();
        configuration.setAllowCacheThisPolicy(Boolean.FALSE);
        CacheControlConstraints constraints = new CacheControlConstraints(configuration);
        CacheControlBuilder builder = policyFactory.createCacheControlBuilder();
        builder.setRetainDuringRetry(true);
        builder.setCacheThisPolicy(true);
        builder.setRetryInterval(-10);
View Full Code Here


            throws Exception {

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        RemotePolicyCacheConfiguration configuration =
                new RemotePolicyCacheConfiguration();
        configuration.setAllowRetryFailedRetrieval(Boolean.FALSE);
        configuration.setDefaultRetryFailedRetrieval(Boolean.TRUE);
        CacheControlConstraints constraints = new CacheControlConstraints(configuration);
        CacheControl cacheControl = constraints.getDefaultCacheControl();

        checkCacheControl(cacheControl, true, false, false, 0, 0, 3600);
    }
View Full Code Here

            throws Exception {

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        RemotePolicyCacheConfiguration configuration =
                new RemotePolicyCacheConfiguration();
        configuration.setAllowRetryFailedRetrieval(Boolean.FALSE);
        CacheControlConstraints constraints = new CacheControlConstraints(configuration);
        CacheControlBuilder builder = policyFactory.createCacheControlBuilder();
        builder.setRetainDuringRetry(true);
        builder.setRetryFailedRetrieval(true);
        builder.setRetryInterval(-10);
View Full Code Here

            throws Exception {

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        RemotePolicyCacheConfiguration configuration =
                new RemotePolicyCacheConfiguration();
        configuration.setAllowRetainDuringRetry(Boolean.FALSE);
        configuration.setDefaultRetainDuringRetry(Boolean.TRUE);
        CacheControlConstraints constraints = new CacheControlConstraints(configuration);
        CacheControl cacheControl = constraints.getDefaultCacheControl();

        checkCacheControl(cacheControl, true, false, true, 600, 5, 3600);
    }
View Full Code Here

            throws Exception {

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        RemotePolicyCacheConfiguration configuration =
                new RemotePolicyCacheConfiguration();
        configuration.setAllowRetainDuringRetry(Boolean.FALSE);
        CacheControlConstraints constraints = new CacheControlConstraints(configuration);
        CacheControlBuilder builder = policyFactory.createCacheControlBuilder();
        builder.setRetainDuringRetry(true);
        builder.setRetryFailedRetrieval(true);
        builder.setRetryInterval(-10);
View Full Code Here

            throws Exception {

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        RemotePolicyCacheConfiguration configuration =
                new RemotePolicyCacheConfiguration();
        configuration.setMinRetryInterval(new Integer(100));
        configuration.setDefaultRetryInterval(new Integer(50));
        CacheControlConstraints constraints = new CacheControlConstraints(configuration);
        CacheControl cacheControl = constraints.getDefaultCacheControl();

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

            throws Exception {

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        RemotePolicyCacheConfiguration configuration =
                new RemotePolicyCacheConfiguration();
        configuration.setMinRetryInterval(new Integer(100));
        configuration.setDefaultRetryInterval(new Integer(150));
        CacheControlConstraints constraints = new CacheControlConstraints(configuration);
        CacheControl cacheControl = constraints.getDefaultCacheControl();

        assertEquals(150, cacheControl.getRetryInterval());
    }
View Full Code Here

            throws Exception {

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        RemotePolicyCacheConfiguration configuration =
                new RemotePolicyCacheConfiguration();
        configuration.setMinRetryInterval(new Integer(100));
        CacheControlConstraints constraints = new CacheControlConstraints(configuration);
        CacheControlBuilder builder = policyFactory.createCacheControlBuilder();
        builder.setRetryInterval(50);
        constraints.applyConstraints(builder);
View Full Code Here

            throws Exception {

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        RemotePolicyCacheConfiguration configuration =
                new RemotePolicyCacheConfiguration();
        configuration.setMinRetryInterval(new Integer(100));
        CacheControlConstraints constraints = new CacheControlConstraints(configuration);
        CacheControlBuilder builder = policyFactory.createCacheControlBuilder();
        builder.setRetryInterval(150);
        constraints.applyConstraints(builder);
View Full Code Here

            throws Exception {

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        RemotePolicyCacheConfiguration configuration =
                new RemotePolicyCacheConfiguration();
        configuration.setMaxRetryMaxCount(new Integer(100));
        configuration.setDefaultRetryMaxCount(new Integer(150));
        CacheControlConstraints constraints = new CacheControlConstraints(configuration);
        CacheControl cacheControl = constraints.getDefaultCacheControl();

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

TOP

Related Classes of com.volantis.mcs.runtime.configuration.RemotePolicyCacheConfiguration

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.