Examples of AggregatedCacheValidity


Examples of org.apache.cocoon.caching.AggregatedCacheValidity

     * @return The generated validity object or <code>null</code> if the
     *         component is currently not cacheable.
     */
    public CacheValidity generateValidity() {
        try {
            AggregatedCacheValidity v = new AggregatedCacheValidity();
            Source current;
            for (int i = 0; i < this.parts.size(); i++) {
                current = ((Part)this.parts.get(i)).source;
                if (current.getLastModified() == 0) {
                        return null;
                } else {
                    v.add(new TimeStampCacheValidity(current.getLastModified()));
                }
            }
            return v;
        } catch (Exception e) {
            getLogger().error("ContentAggregator: could not generateKey", e);
View Full Code Here

Examples of org.apache.cocoon.caching.AggregatedCacheValidity

     * @return The generated validity object or <code>null</code> if the
     *         component is currently not cacheable.
     */
    public CacheValidity generateValidity() {
        try {
            AggregatedCacheValidity v = new AggregatedCacheValidity();
            Source current;
            for (int i = 0; i < this.parts.size(); i++) {
                current = ((Part)this.parts.get(i)).source;
                if (current.getLastModified() == 0) {
                        return null;
                } else {
                    v.add(new TimeStampCacheValidity(current.getLastModified()));
                }
            }
            return v;
        } catch (Exception e) {
            getLogger().error("ContentAggregator: could not generateKey", e);
View Full Code Here

Examples of org.apache.cocoon.caching.AggregatedCacheValidity

        String id = stylesheet.getSystemId();
        Object[] templateAndTimeAndIncludes = (Object[])store.get(id);
        if (templateAndTimeAndIncludes != null && templateAndTimeAndIncludes[2] != null) {
            // Create aggregated validity
            List includes = (List)templateAndTimeAndIncludes[2];
            AggregatedCacheValidity validity = new AggregatedCacheValidity();
            validity.add(new TimeStampCacheValidity(stylesheet.getLastModified()));
            for (int i = includes.size() - 1; i >= 0; i--) {
                Object[] pair = (Object[])includes.get(i);
                long time = ((Long)pair[1]).longValue();
                validity.add(new TimeStampCacheValidity(time));
            }
            return validity;
        } else {
            // No data - fallback to previous implementation
            return new TimeStampCacheValidity(stylesheet.getLastModified());
View Full Code Here

Examples of org.apache.cocoon.caching.AggregatedCacheValidity

     * @return The generated validity object or <code>null</code> if the
     *         component is currently not cacheable.
     */
    public CacheValidity generateValidity() {
        try {
            AggregatedCacheValidity v = new AggregatedCacheValidity();
            Source current;
            for (int i = 0; i < this.parts.size(); i++) {
                current = ((Part)this.parts.get(i)).source;
                if (current.getLastModified() == 0) {
                        return null;
                } else {
                    v.add(new TimeStampCacheValidity(current.getLastModified()));
                }
            }
            return v;
        } catch (Exception e) {
            getLogger().error("ContentAggregator: could not generateKey", e);
View Full Code Here

Examples of org.apache.cocoon.caching.AggregatedCacheValidity

     * @return The generated validity object or <code>null</code> if the
     *         component is currently not cacheable.
     */
    public CacheValidity generateValidity() {
        try {
            AggregatedCacheValidity v = new AggregatedCacheValidity();
            Source current;
            for (int i = 0; i < this.parts.size(); i++) {
                current = ((Part)this.parts.get(i)).source;
                if (current.getLastModified() == 0) {
                        return null;
                } else {
                    v.add(new TimeStampCacheValidity(current.getLastModified()));
                }
            }
            return v;
        } catch (Exception e) {
            getLogger().error("ContentAggregator: could not generateKey", e);
View Full Code Here

Examples of org.apache.cocoon.caching.AggregatedCacheValidity

        String id = stylesheet.getSystemId();
        Object[] templateAndTimeAndIncludes = (Object[])store.get(id);
        if (templateAndTimeAndIncludes != null && templateAndTimeAndIncludes[2] != null) {
            // Create aggregated validity
            List includes = (List)templateAndTimeAndIncludes[2];
            AggregatedCacheValidity validity = new AggregatedCacheValidity();
            validity.add(new TimeStampCacheValidity(stylesheet.getLastModified()));
            for (int i = includes.size() - 1; i >= 0; i--) {
                Object[] pair = (Object[])includes.get(i);
                long time = ((Long)pair[1]).longValue();
                validity.add(new TimeStampCacheValidity(time));
            }
            return validity;
        } else {
            // No data - fallback to previous implementation
            return new TimeStampCacheValidity(stylesheet.getLastModified());
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.