Package com.volantis.mcs.runtime.configuration

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


            throws Exception {

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

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


            throws Exception {

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

            throws Exception {

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

            throws Exception {

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        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

            throws Exception {

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        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

            throws Exception {

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

            throws Exception {

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

        clockMock.expects.getCurrentTime().returns(Time.inMilliSeconds(5));

        PolicyCacheBuilder builder = new PolicyCacheBuilder(100, 1000,
                clockMock);

        RemotePolicyCacheConfiguration configuration =
                new RemotePolicyCacheConfiguration();
        configuration.setMaxTimeToLive(new Integer(200));
        configuration.setDefaultRetryInterval(new Integer(2));

        constraints = new CacheControlConstraints(configuration);

        PolicyCachePartitionConstraints partitionConstraints =
                new PolicyCachePartitionConstraintsImpl(50, 60, constraints);
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.