Examples of PipelineCacheKey


Examples of org.apache.cocoon.caching.PipelineCacheKey

            this.environment.changeToLastContext();
                String redirectURL = this.environment.getRedirectURL();
                if (redirectURL == null) {
                    if (this.eventPipeline instanceof CacheableEventPipeline) {
                        CacheableEventPipeline cep = (CacheableEventPipeline)this.eventPipeline;
                        PipelineCacheKey pck = cep.generateKey(this.environment);
                        Map validity = null;
                        if (pck != null) {
                            validity = cep.generateValidity(this.environment);
                            if (validity != null) {
                                // the event pipeline is cacheable
                                // now calculate a last modification date
                                String hashKey = pck.toString() + validity.toString();
                                this.lastModificationDate = HashUtil.hash(hashKey);
                            }
                        }
                    }
                } else {
View Full Code Here

Examples of org.apache.cocoon.caching.PipelineCacheKey

            this.environment.changeToLastContext();
                String redirectURL = this.environment.getRedirectURL();
                if (redirectURL == null) {
                    if (this.eventPipeline instanceof CacheableEventPipeline) {
                        CacheableEventPipeline cep = (CacheableEventPipeline)this.eventPipeline;
                        PipelineCacheKey pck = cep.generateKey(this.environment);
                        Map validity = null;
                        if (pck != null) {
                            validity = cep.generateValidity(this.environment);
                            if (validity != null) {
                                // the event pipeline is cacheable
                                // now calculate a last modification date
                                String hashKey = pck.toString() + validity.toString();
                                this.lastModificationDate = HashUtil.hash(hashKey);
                            }
                        }
                    }
                } else {
View Full Code Here

Examples of org.apache.cocoon.caching.PipelineCacheKey

        // to build a unique key of the request

        // is the generator cacheable?
        Serializable key = getGeneratorKey();
        if (key != null) {
            this.toCacheKey = new PipelineCacheKey();
            this.toCacheKey.addKey(
                    this.newComponentCacheKey(
                        ComponentCacheKey.ComponentType_Generator,
                        this.generatorRole, key));
View Full Code Here

Examples of org.apache.cocoon.caching.PipelineCacheKey

        throws ProcessingException {
        try {
            boolean usedCache = false;
            OutputStream outputStream = null;
            SourceValidity readerValidity = null;
            PipelineCacheKey pcKey = null;

            // test if reader is cacheable
            Serializable readerKey = null;
            boolean isCacheableProcessingComponent = false;
            if (super.reader instanceof CacheableProcessingComponent) {
                readerKey = ((CacheableProcessingComponent)super.reader).getKey();
                isCacheableProcessingComponent = true;
            } else if (super.reader instanceof Cacheable) {
                readerKey = new Long(((Cacheable)super.reader).generateKey());
            }

            boolean finished = false;

            if (readerKey != null) {
                // response is cacheable, build the key
                pcKey = new PipelineCacheKey();
                pcKey.addKey(new ComponentCacheKey(ComponentCacheKey.ComponentType_Reader,
                            this.readerRole,
                            readerKey)
                        );

                while(!finished) {
View Full Code Here

Examples of org.apache.cocoon.caching.PipelineCacheKey

        // to build a unique key of the request

        // is the generator cacheable?
        Serializable key = getGeneratorKey();
        if (key != null) {
            this.toCacheKey = new PipelineCacheKey();
            this.toCacheKey.addKey(
                    this.newComponentCacheKey(
                            ComponentCacheKey.ComponentType_Generator,
                            this.generatorRole, key));
View Full Code Here

Examples of org.apache.cocoon.caching.PipelineCacheKey

    throws ProcessingException {
        try {
            boolean usedCache = false;
            OutputStream outputStream = null;
            SourceValidity readerValidity = null;
            PipelineCacheKey pcKey = null;

            // test if reader is cacheable
            Serializable readerKey = null;
            boolean isCacheableProcessingComponent = false;
            if (super.reader instanceof CacheableProcessingComponent) {
                readerKey = ((CacheableProcessingComponent)super.reader).getKey();
                isCacheableProcessingComponent = true;
            } else if (super.reader instanceof Cacheable) {
                readerKey = new Long(((Cacheable)super.reader).generateKey());
            }

            if (readerKey != null) {
                // response is cacheable, build the key
                pcKey = new PipelineCacheKey();
                pcKey.addKey(new ComponentCacheKey(ComponentCacheKey.ComponentType_Reader,
                                                   this.readerRole,
                                                   readerKey)
                            );

                // now we have the key to get the cached object
View Full Code Here

Examples of org.apache.cocoon.caching.PipelineCacheKey

        } else if (super.generator instanceof Cacheable) {
            key = new Long(((Cacheable)super.generator).generateKey());
        }

        if (key != null) {
            this.toCacheKey = new PipelineCacheKey();
            this.toCacheKey.addKey(
                    this.newComponentCacheKey(
                            ComponentCacheKey.ComponentType_Generator,
                            this.generatorRole, key));
View Full Code Here

Examples of org.apache.cocoon.caching.PipelineCacheKey

    throws ProcessingException {
        try {
            boolean usedCache = false;
            OutputStream outputStream = null;
            SourceValidity readerValidity = null;
            PipelineCacheKey pcKey = null;

            // test if reader is cacheable
            Serializable readerKey = null;
            boolean isCacheableProcessingComponent = false;
            if (super.reader instanceof CacheableProcessingComponent) {
                readerKey = ((CacheableProcessingComponent)super.reader).getKey();
                isCacheableProcessingComponent = true;
            } else if (super.reader instanceof Cacheable) {
                readerKey = new Long(((Cacheable)super.reader).generateKey());
            }

            if ( readerKey != null) {
                // response is cacheable, build the key
                pcKey = new PipelineCacheKey();
                pcKey.addKey(new ComponentCacheKey(ComponentCacheKey.ComponentType_Reader,
                                                   this.readerRole,
                                                   readerKey)
                            );

                // now we have the key to get the cached object
View Full Code Here

Examples of org.apache.cocoon.caching.PipelineCacheKey

        // to build a unique key of the request

        // is the generator cacheable?
        Serializable key = getGeneratorKey();
        if (key != null) {
            this.toCacheKey = new PipelineCacheKey();
            this.toCacheKey.addKey(
                    this.newComponentCacheKey(
                        ComponentCacheKey.ComponentType_Generator,
                        this.generatorRole, key));
View Full Code Here

Examples of org.apache.cocoon.caching.PipelineCacheKey

        throws ProcessingException {
        try {
            boolean usedCache = false;
            OutputStream outputStream = null;
            SourceValidity readerValidity = null;
            PipelineCacheKey pcKey = null;

            // test if reader is cacheable
            Serializable readerKey = null;
            boolean isCacheableProcessingComponent = false;
            if (super.reader instanceof CacheableProcessingComponent) {
                readerKey = ((CacheableProcessingComponent)super.reader).getKey();
                isCacheableProcessingComponent = true;
            } else if (super.reader instanceof Cacheable) {
                readerKey = new Long(((Cacheable)super.reader).generateKey());
            }

            boolean finished = false;

            if (readerKey != null) {
                // response is cacheable, build the key
                pcKey = new PipelineCacheKey();
                pcKey.addKey(new ComponentCacheKey(ComponentCacheKey.ComponentType_Reader,
                            this.readerRole,
                            readerKey)
                        );

                while(!finished) {
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.