Package org.apache.tuscany.sca.domain.manager.impl.CompositeGeneratorServiceImpl.Cache

Examples of org.apache.tuscany.sca.domain.manager.impl.CompositeGeneratorServiceImpl.Cache.ContributionCache


        try {
            URI uri = URI.create(contributionURI);
            URL location = locationURL(contributionLocation);

            // Get contribution from cache
            ContributionCache contributionCache = cache.contributions.get(location);
            long lastModified = lastModified(location);
            if (contributionCache != null) {
                if (contributionCache.contributionLastModified == lastModified) {
                    return contributionCache.contribution;
                }
               
                // Reset contribution cache
                cache.contributions.remove(location);
            }
           
            Contribution contribution = (Contribution)contributionProcessor.read(null, uri, location);
           
            contributionProcessor.resolve(contribution, new DefaultModelResolver());

            // Cache contribution
            contributionCache = new ContributionCache();
            contributionCache.contribution = contribution;
            contributionCache.contributionLastModified = lastModified;
            cache.contributions.put(location, contributionCache);
           
            return contribution;
View Full Code Here


        try {
            URI uri = URI.create(contributionURI);
            URL location = locationURL(contributionLocation);

            // Get contribution from cache
            ContributionCache contributionCache = cache.contributions.get(location);
            long lastModified = lastModified(location);
            if (contributionCache != null) {
                if (contributionCache.contributionLastModified == lastModified) {
                    return contributionCache.contribution;
                }
               
                // Reset contribution cache
                cache.contributions.remove(location);
            }
           
            Contribution contribution = (Contribution)contributionProcessor.read(null, uri, location);
           
            contributionProcessor.resolve(contribution, new DefaultModelResolver());

            // Cache contribution
            contributionCache = new ContributionCache();
            contributionCache.contribution = contribution;
            contributionCache.contributionLastModified = lastModified;
            cache.contributions.put(location, contributionCache);
           
            return contribution;
View Full Code Here

        try {
            URI uri = URI.create(contributionURI);
            URL location = locationURL(contributionLocation);

            // Get contribution from cache
            ContributionCache contributionCache = cache.contributions.get(location);
            long lastModified = lastModified(location);
            if (contributionCache != null) {
                if (contributionCache.contributionLastModified == lastModified) {
                    return contributionCache.contribution;
                }
               
                // Reset contribution cache
                cache.contributions.remove(location);
            }
           
            Contribution contribution = (Contribution)contributionProcessor.read(null, uri, location);
           
            contributionProcessor.resolve(contribution, new DefaultModelResolver());

            // Cache contribution
            contributionCache = new ContributionCache();
            contributionCache.contribution = contribution;
            contributionCache.contributionLastModified = lastModified;
            cache.contributions.put(location, contributionCache);
           
            return contribution;
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.domain.manager.impl.CompositeGeneratorServiceImpl.Cache.ContributionCache

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.