Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoribull2010-02-04 18:58:40 -0500
committeribull2010-02-04 18:58:40 -0500
commit9ca2c2a2a099f684074bbd83ffe0558ff5e56f64 (patch)
treef3103f43b46f6384c43e93c39529c0a610d78740 /bundles/org.eclipse.equinox.p2.directorywatcher
parent2476ddbea1cf40a85520fb9168aa59e2d68b48f2 (diff)
downloadrt.equinox.p2-9ca2c2a2a099f684074bbd83ffe0558ff5e56f64.tar.gz
rt.equinox.p2-9ca2c2a2a099f684074bbd83ffe0558ff5e56f64.tar.xz
rt.equinox.p2-9ca2c2a2a099f684074bbd83ffe0558ff5e56f64.zip
bug 274025: [publisher] p2 metadata generator does not scale
https://bugs.eclipse.org/bugs/show_bug.cgi?id=274025 This adds a batch process to ArtifactRepository which, in the simple artifact repository, will do the save at the end. The publisher is configured to use the batch process now.
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.directorywatcher')
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
index 419339d3e..4dcc17383 100644
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
@@ -257,4 +257,14 @@ public class CachingArtifactRepository implements IArtifactRepository, IFileArti
CompoundQueryable<IArtifactKey> compound = new CompoundQueryable<IArtifactKey>(cached, innerRepo);
return compound.query(query, monitor);
}
+
+ public IStatus executeBatch(Runnable runnable) {
+ try {
+ runnable.run();
+ } catch (Exception e) {
+ return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
+ }
+ return Status.OK_STATUS;
+ }
+
}

Back to the top