Package com.volantis.shared.dependency

Examples of com.volantis.shared.dependency.Cacheability


    }

    // Javadoc inherited.
    public Cacheability getCacheability() {

        Cacheability cacheability = Cacheability.CACHEABLE;
        for (int i = 0; i < dependencies.length &&
                cacheability == Cacheability.CACHEABLE; i++) {
            Dependency dependency = dependencies[i];
            cacheability = dependency.getCacheability();
        }
View Full Code Here


            Freshness revalidated = dependency.revalidate(context);
            generateSimpleElement(target, revalidated.toString(),
                    "revalidated");
        }

        Cacheability cacheability = dependency.getCacheability();
        generateSimpleElement(target, cacheability.toString(), "cacheability");

        Period timeToLive = dependency.getTimeToLive();
        generateSimpleElement(target, timeToLive.toString(), "time-to-live");

        Validity validity = context.checkValidity(dependency);
View Full Code Here

        if (value == null) {
            cacheable = true;
        } else {
            cacheable = "true".equalsIgnoreCase(value);
        }
        Cacheability cacheability =
                (cacheable ? Cacheability.CACHEABLE : Cacheability.UNCACHEABLE);

        // Get the time to live.
        value = attributes.getValue("time-to-live");
        final Period timeToLive;
View Full Code Here

            if (value != null && !value.equals("indefinitely")) {
                timeToLive = Period.inSeconds(Integer.parseInt(value));
            }
        }

        Cacheability cacheability =
                cacheable ? Cacheability.CACHEABLE : Cacheability.UNCACHEABLE;

        Dependency dependency = new TestDependency(cacheability, timeToLive,
                freshness, revalidated);
        DependencyContext dependencyContext = context.getDependencyContext();
View Full Code Here

        tracker.addDependency(dependency1Mock);
        tracker.addDependency(dependency2Mock);

        Dependency aggregate = tracker.extractDependency();

        Cacheability cacheability = aggregate.getCacheability();
        assertEquals(Cacheability.UNCACHEABLE, cacheability);

        Period timeToLive = aggregate.getTimeToLive();
        assertEquals(Period.inSeconds(100), timeToLive);
View Full Code Here

TOP

Related Classes of com.volantis.shared.dependency.Cacheability

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.