Package org.apache.excalibur.store.impl

Examples of org.apache.excalibur.store.impl.MRUMemoryStore


            MalformedURLException {

        String[] uris;

        if (useCache()) {
            MRUMemoryStore store = getStore();
            final String cacheKey = getCacheKey(getPublicationId(), location);
            final String[] cachedUris = (String[]) store.get(cacheKey);
            if (cachedUris == null) {
                uris = findUris(location, parameters);
                store.hold(cacheKey, uris);
                if (getLogger().isDebugEnabled()) {
                    getLogger().debug("No cached source URI for key " + cacheKey + ", caching resolved URIs.");
                }
            } else {
                uris = cachedUris;
View Full Code Here


            MalformedURLException {

        Source source;

        if (useCache()) {
            MRUMemoryStore store = getStore();
            final String pubId = getPublicationId();
            final String cacheKey = getCacheKey(pubId, location);
            final String cachedSourceUri = (String) store.get(cacheKey);

            if (cachedSourceUri == null) {
                source = findSource(location, parameters);
                final String resolvedSourceUri = source.getURI();
                store.hold(cacheKey, resolvedSourceUri);
                if (getLogger().isDebugEnabled()) {
                    getLogger().debug(
                            "No cached source URI for key " + cacheKey + ", caching URI "
                                    + resolvedSourceUri);
                }
View Full Code Here

        String uri;
        String fallbackUri = getFallbackUri(name);
        if (useCache()) {
            final String pubId = getPublicationId(objectModel);
            String cacheKey = FallbackSourceFactory.getCacheKey(pubId, fallbackUri);
            MRUMemoryStore store = getStore();
            if (store.containsKey(cacheKey)) {
                uri = (String) store.get(cacheKey);
            }
            else {
                uri = resolveSourceUri(name);
            }
        }
View Full Code Here

     * @return A meta data object.
     * @throws MetaDataException if an error occurs.
     */
    public synchronized MetaData getMetaData(String cacheKey, MetaData meta, String namespaceUri)
            throws MetaDataException {
        MRUMemoryStore store = getStore();
        String key = getCacheKey(cacheKey, namespaceUri);

        MetaData cachedMeta = null;
        if (store.containsKey(key)) {
            cachedMeta = (MetaData) store.get(key);
            if (meta.getLastModified() > cachedMeta.getLastModified()) {
                cachedMeta = null;
            }
        }
        if (cachedMeta == null) {
            cachedMeta = new CacheableMetaData(meta);
            store.hold(key, cachedMeta);
        }
        return cachedMeta;
    }
View Full Code Here

TOP

Related Classes of org.apache.excalibur.store.impl.MRUMemoryStore

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.