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

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


            for (Contribution c: workspace.getContributions()) {
                URI uri = URI.create(c.getURI());
                URL location = locationURL(c.getLocation());
               
                // Get contribution from cache
                ContributionCache contributionCache = cache.contributions.get(location);
                long lastModified = lastModified(location);
                if (contributionCache != null) {
                    if (contributionCache.contributionLastModified == lastModified) {
                        Contribution contribution = contributionCache.contribution;
                        contribution.setUnresolved(false);
                        contributions.getContributions().add(contribution);
                        continue;
                    }
                   
                    // Reset contribution cache
                    cache.contributions.remove(location);
                }
               
                try {
                    Contribution contribution = (Contribution)contributionProcessor.read(null, uri, location);
                    contribution.setUnresolved(false);
                    contributions.getContributions().add(contribution);
                   
                    // Cache contribution
                    contributionCache = new ContributionCache();
                    contributionCache.contribution = contribution;
                    contributionCache.contributionLastModified = lastModified;
                    cache.contributions.put(location, contributionCache);
                   
                   
View Full Code Here


            for (Contribution c: workspace.getContributions()) {
                URI uri = URI.create(c.getURI());
                URL location = locationURL(c.getLocation());
               
                // Get contribution from cache
                ContributionCache contributionCache = cache.contributions.get(location);
                long lastModified = lastModified(location);
                if (contributionCache != null) {
                    if (contributionCache.contributionLastModified == lastModified) {
                        Contribution contribution = contributionCache.contribution;
                        contribution.setUnresolved(false);
                        contributions.getContributions().add(contribution);
                        continue;
                    }
                   
                    // Reset contribution cache
                    cache.contributions.remove(location);
                }
               
                try {
                    Contribution contribution = (Contribution)contributionProcessor.read(null, uri, location);
                    contribution.setUnresolved(false);
                    contributions.getContributions().add(contribution);
                   
                    // Cache contribution
                    contributionCache = new ContributionCache();
                    contributionCache.contribution = contribution;
                    contributionCache.contributionLastModified = lastModified;
                    cache.contributions.put(location, contributionCache);
                   
                   
View Full Code Here

            for (Contribution c: workspace.getContributions()) {
                URI uri = URI.create(c.getURI());
                URL location = locationURL(c.getLocation());
               
                // Get contribution from cache
                ContributionCache contributionCache = cache.contributions.get(location);
                long lastModified = lastModified(location);
                if (contributionCache != null) {
                    if (contributionCache.contributionLastModified == lastModified) {
                        Contribution contribution = contributionCache.contribution;
                        contribution.setUnresolved(false);
                        contributions.getContributions().add(contribution);
                        continue;
                    }
                   
                    // Reset contribution cache
                    cache.contributions.remove(location);
                }
               
                try {
                    Contribution contribution = (Contribution)contributionProcessor.read(null, uri, location);
                    contribution.setUnresolved(false);
                    contributions.getContributions().add(contribution);
                   
                    // Cache contribution
                    contributionCache = new ContributionCache();
                    contributionCache.contribution = contribution;
                    contributionCache.contributionLastModified = lastModified;
                    cache.contributions.put(location, contributionCache);
                   
                   
View Full Code Here

            for (Contribution c: workspace.getContributions()) {
                URI uri = URI.create(c.getURI());
                URL location = locationURL(c.getLocation());
               
                // Get contribution from cache
                ContributionCache contributionCache = cache.contributions.get(location);
                long lastModified = lastModified(location);
                if (contributionCache != null) {
                    if (contributionCache.contributionLastModified == lastModified) {
                        Contribution contribution = contributionCache.contribution;
                        contribution.setUnresolved(false);
                        contributions.getContributions().add(contribution);
                        continue;
                    }
                   
                    // Reset contribution cache
                    cache.contributions.remove(location);
                }
               
                try {
                    Contribution contribution = (Contribution)contributionProcessor.read(null, uri, location);
                    contribution.setUnresolved(false);
                    contributions.getContributions().add(contribution);
                   
                    // Cache contribution
                    contributionCache = new ContributionCache();
                    contributionCache.contribution = contribution;
                    contributionCache.contributionLastModified = lastModified;
                    cache.contributions.put(location, contributionCache);
                   
                   
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.domain.manager.impl.ContributionCollectionImpl.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.