Examples of freshness()


Examples of com.volantis.shared.dependency.Dependency.freshness()

        context.popDependencyTracker();

        XMLProcess target = getTargetProcess(dynamicProcess);

        // Generate an element containing the freshness.
        Freshness freshness = dependency.freshness(context);
        generateSimpleElement(target, freshness.toString(),
                "freshness");

        // Generate an element containing the revalidated freshness.
        if (freshness == Freshness.REVALIDATE) {
View Full Code Here

Examples of com.volantis.shared.dependency.Dependency.freshness()

        Dependency aggregate = new Dependencies(Arrays.asList(
                new Dependency[] {
                    dependency1Mock, dependency2Mock
                }));

        Freshness actual = aggregate.freshness(contextMock);
        assertEquals(expected, actual);
    }

}
View Full Code Here

Examples of com.volantis.shared.dependency.Dependency.freshness()

        DependencyTracker tracker =
                new DependencyTrackerImpl();
        Dependency dependency = tracker.extractDependency();
        assertEquals(Cacheability.CACHEABLE, dependency.getCacheability());
        assertEquals(Period.INDEFINITELY, dependency.getTimeToLive());
        TestCaseAbstract.assertEquals(Freshness.FRESH, dependency.freshness(contextMock));
        try {
            dependency.revalidate(contextMock);
            fail("Did not detect invalid call to revalidate");
        } catch(IllegalStateException e) {
            // Expected.
View Full Code Here

Examples of com.volantis.shared.dependency.Dependency.freshness()

        assertEquals(Cacheability.UNCACHEABLE, cacheability);

        Period timeToLive = aggregate.getTimeToLive();
        assertEquals(Period.inSeconds(100), timeToLive);

        Freshness freshness = aggregate.freshness(contextMock);
        assertEquals(Freshness.REVALIDATE, freshness);

        Freshness revalidate = aggregate.revalidate(contextMock);
        assertEquals(Freshness.FRESH, revalidate);
    }
View Full Code Here

Examples of com.volantis.shared.dependency.Dependency.freshness()

                        // revalidated
                        final DependencyContext dependencyContext =
                            getPipelineContext().getDependencyContext();
                        final Dependency dependency = value.getDependency();
                        Freshness freshness =
                            dependency.freshness(dependencyContext);
                        if (freshness == Freshness.REVALIDATE) {
                            freshness =
                                dependency.revalidate(dependencyContext);
                        }
View Full Code Here

Examples of com.volantis.xml.expression.impl.Dependencies.freshness()

        Dependency aggregate = new Dependencies(Arrays.asList(
                new Dependency[] {
                    dependency1Mock, dependency2Mock
                }));

        Freshness actual = aggregate.freshness(contextMock);
        assertEquals(expected, actual);
    }

}
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.