Package org.apache.cocoon.caching.validity

Examples of org.apache.cocoon.caching.validity.NamedEvent


                }
                if (eventName == null || "".equals(eventName)) {
                    return null;
                }
                ((EventAwareCacheImpl)cache).processEvent(
                                                    new NamedEvent(eventName));
            }
        } finally {
            this.manager.release(cache);
        }
        return EMPTY_MAP;
View Full Code Here


     * @return  the cache event.
     */
    protected Event[] eventsFromMessage(Message message) {
        String name = message.toString();
        int pos = name.indexOf('|');
        return new Event[] { new NamedEvent(name.substring(pos + 1)) };
    }
View Full Code Here

     * @return  the cache event.
     */
    protected Event convertMessage(Message message) {
        String name = message.toString();
        int pos = name.indexOf('|');
        return new NamedEvent(name.substring(pos + 1));
    }
View Full Code Here

    public SourceValidity getValidity() {
        try {
            if (m_validity == null) {
                if (m_useEventCaching) {
                    m_validity = new EventValidity(
                        new NamedEvent(m_nat.getName() + m_uri));
                }
                else if (m_descriptor != null) {
                    m_validity = new TimeStampValidity(
                        m_descriptor.getLastModifiedAsDate().getTime());
                }
View Full Code Here

     */
    public SourceValidity getValidity() {
        final Request request = ObjectModelHelper.getRequest(this.objectModel);
        String key = request.getParameter("pageKey") ;
        return new EventValidity(
                   new NamedEvent(
                       (key==null||"".equals(key)) ? "one" : key));
    }
View Full Code Here

            }
            if (eventName == null || "".equals(eventName)) {
                return null;
            }
            ((EventAwareCacheImpl)cache).processEvent(
                                                new NamedEvent(eventName));
        }
        this.manager.release(cache);
        return EMPTY_MAP;
    }
View Full Code Here

                this.getLogger().info(
                    "Notifying "
                        + this.serviceName
                        + " of "
                        + this.convertMessage(message.toString()));
            service.processEvent(new NamedEvent(this.convertMessage(message.toString())));
        } catch (ServiceException e) {
            if (this.getLogger().isErrorEnabled()) {
                this.getLogger().error(
                    "Could not obtain " + this.serviceName + " from component manager.",
                    e);
View Full Code Here

                getLogger().debug("Configured for cache event named: " + eventName);
            }
            if (eventName == null || "".equals(eventName)) {
                return null;
            }
            ((EventAwareCacheImpl)cache).processEvent(new NamedEvent(eventName));
        }
        this.manager.release( cache );
        return EMPTY_MAP;
    }
View Full Code Here

    }

    protected SourceValidity[] getCacheValidities() {
        if (this.cache instanceof EventAware) {
            // use event caching strategy, the associated event is the source uri
            return new SourceValidity[] { new EventValidity(new NamedEvent(this.source.getURI())) };
        } else {
            // we need to store both the cache expiration and the original source validity
            // the former is to determine whether to recheck the latter (see checkValidity)
            return new SourceValidity[] { new ExpiresValidity(getExpiration()), source.getValidity() };
        }
View Full Code Here

            }
            if (eventName == null || "".equals(eventName)) {
                return null;
            }
            ((EventAwareCacheImpl)cache).processEvent(
                                                new NamedEvent(eventName));
        }
        this.manager.release(cache);
        return EMPTY_MAP;
    }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.caching.validity.NamedEvent

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.