Package org.apache.cocoon.pipeline.caching

Examples of org.apache.cocoon.pipeline.caching.CompoundCacheKey


     * {@inheritDoc}
     *
     * @see org.apache.cocoon.pipeline.component.CachingPipelineComponent#constructCacheKey()
     */
    public CacheKey constructCacheKey() {
        CompoundCacheKey cacheKey = new CompoundCacheKey();

        try {
            cacheKey.addCacheKey(new TimestampCacheKey(this.source, this.source.openConnection().getLastModified()));
            cacheKey.addCacheKey(new ParameterCacheKey("contextParameters", this.parameters));
        } catch (IOException e) {
            throw new SetupException(e);
        }

        return cacheKey;
View Full Code Here


    public CacheKey constructCacheKey() {
        if (this.source == null) {
            throw new IllegalArgumentException(this.getClass().getSimpleName() + " has no source.");
        }

        CompoundCacheKey cacheKey = new CompoundCacheKey();

        try {
            cacheKey.addCacheKey(new TimestampCacheKey(this.source, this.source.openConnection().getLastModified()));
            cacheKey.addCacheKey(new ParameterCacheKey("contextParameters", this.parameters));
        } catch (IOException e) {
            throw new SetupException("Could not create cache key.", e);
        }

        return cacheKey;
View Full Code Here

    private String jmxGroupName;

    private final Log logger = LogFactory.getLog(this.getClass());

    public CacheKey constructCacheKey() {
        CompoundCacheKey result = new CompoundCacheKey();
        if (this.logger.isDebugEnabled()) {
            this.logger.debug("Creating " + result + ": ");
        }

        for (PipelineComponent pipelineComponent : this.getComponents()) {
            if (pipelineComponent instanceof CachingPipelineComponent) {
                CachingPipelineComponent cachablePipelineComponent = (CachingPipelineComponent) pipelineComponent;

                CacheKey cacheKey = cachablePipelineComponent.constructCacheKey();
                if (cacheKey != null) {
                    result.addCacheKey(cacheKey);
                    if (this.logger.isDebugEnabled()) {
                        this.logger.debug("  ~ adding " + cacheKey + " for component " + pipelineComponent);
                    }

                    continue;
View Full Code Here

     * {@inheritDoc}
     *
     * @see org.apache.cocoon.pipeline.component.CachingPipelineComponent#constructCacheKey()
     */
    public CacheKey constructCacheKey() {
        CompoundCacheKey cacheKey = new CompoundCacheKey();

        try {
            cacheKey.addCacheKey(new TimestampCacheKey(this.source, this.source.openConnection().getLastModified()));
            cacheKey.addCacheKey(new ParameterCacheKey("contextParameters", this.parameters));
        } catch (IOException e) {
            throw new SetupException(e);
        }

        return cacheKey;
View Full Code Here

    public CacheKey constructCacheKey() {
        if (this.source == null) {
            throw new IllegalArgumentException(this.getClass().getSimpleName() + " has no source.");
        }

        CompoundCacheKey cacheKey = new CompoundCacheKey();

        try {
            cacheKey.addCacheKey(new TimestampCacheKey(this.source, this.source.openConnection().getLastModified()));
            cacheKey.addCacheKey(new ParameterCacheKey("contextParameters", this.parameters));
        } catch (IOException e) {
            throw new SetupException("Could not create cache key.", e);
        }

        return cacheKey;
View Full Code Here

        }
        return this.cacheKey.getLastModifed();
    }

    public CacheKey constructCacheKey() {
        CompoundCacheKey result = new CompoundCacheKey();
        if (this.logger.isDebugEnabled()) {
            this.logger.debug("Creating " + result + ": ");
        }

        for (PipelineComponent pipelineComponent : this.getComponents()) {
            if (pipelineComponent instanceof CachingPipelineComponent) {
                CachingPipelineComponent cachablePipelineComponent = (CachingPipelineComponent) pipelineComponent;

                CacheKey cacheKey = cachablePipelineComponent.constructCacheKey();
                result.addCacheKey(cacheKey);
                if (this.logger.isDebugEnabled()) {
                    this.logger.debug("  ~ adding " + cacheKey + " for component " + pipelineComponent);
                }

                continue;
View Full Code Here

     * {@inheritDoc}
     *
     * @see org.apache.cocoon.pipeline.component.CachingPipelineComponent#constructCacheKey()
     */
    public CacheKey constructCacheKey() {
        CompoundCacheKey cacheKey = new CompoundCacheKey();

        try {
            cacheKey.addCacheKey(new TimestampCacheKey(this.source, this.source.openConnection().getLastModified()));
            cacheKey.addCacheKey(new ParameterCacheKey(this.parameters));
        } catch (IOException e) {
            e.printStackTrace();
        }

        return cacheKey;
View Full Code Here

TOP

Related Classes of org.apache.cocoon.pipeline.caching.CompoundCacheKey

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.