Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2008-04-11 18:46:04 +0000
committerJohn Arthorne2008-04-11 18:46:04 +0000
commitc9f0dee1690b8a9c6b5784301ab2d1e13f57e5cf (patch)
tree9a0004d083d99e22fbeecc2169422cacc7726ce8 /bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java
parent270568c7d37f026014753cfb6244a96297e806f9 (diff)
downloadrt.equinox.p2-c9f0dee1690b8a9c6b5784301ab2d1e13f57e5cf.tar.gz
rt.equinox.p2-c9f0dee1690b8a9c6b5784301ab2d1e13f57e5cf.tar.xz
rt.equinox.p2-c9f0dee1690b8a9c6b5784301ab2d1e13f57e5cf.zip
Bug 217093 [prov] Cleanup of SimpleMetadataRepositoryFactory's cache when repository is removed
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java
index aa39c9c14..8e8a241a1 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java
@@ -17,18 +17,29 @@ public class Activator implements BundleActivator {
public static final String ID = "org.eclipse.equinox.p2.metadata.repository"; //$NON-NLS-1$
public static final String REPO_PROVIDER_XPT = ID + '.' + "metadataRepositories"; //$NON-NLS-1$
+
private static BundleContext bundleContext;
+ private static CacheManager cacheManager;
public static BundleContext getContext() {
return bundleContext;
}
+ public static CacheManager getCacheManager() {
+ return cacheManager;
+ }
+
public void start(BundleContext context) throws Exception {
Activator.bundleContext = context;
+ cacheManager = new CacheManager();
+ cacheManager.registerRepoEventListener();
}
public void stop(BundleContext context) throws Exception {
+ if (cacheManager != null) {
+ cacheManager.unregisterRepoEventListener();
+ cacheManager = null;
+ }
Activator.bundleContext = null;
}
-
}

Back to the top