X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fclustering%2Fservices_implementation%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fclustering%2Fservices_implementation%2Finternal%2FClusterGlobalManager.java;h=e05f9dfe169555237e4b3469c917e5c09f11b882;hb=78405e6699eb9c85e8b0c3e2fd85a798f0bcbd55;hp=ce33ac8639cf89977c1c1f7f79d19e15a2da3dae;hpb=c7580b185ce5ac0efd9d2184cb68efb7ab2a33d3;p=controller.git diff --git a/opendaylight/clustering/services_implementation/src/main/java/org/opendaylight/controller/clustering/services_implementation/internal/ClusterGlobalManager.java b/opendaylight/clustering/services_implementation/src/main/java/org/opendaylight/controller/clustering/services_implementation/internal/ClusterGlobalManager.java index ce33ac8639..e05f9dfe16 100644 --- a/opendaylight/clustering/services_implementation/src/main/java/org/opendaylight/controller/clustering/services_implementation/internal/ClusterGlobalManager.java +++ b/opendaylight/clustering/services_implementation/src/main/java/org/opendaylight/controller/clustering/services_implementation/internal/ClusterGlobalManager.java @@ -10,6 +10,7 @@ package org.opendaylight.controller.clustering.services_implementation.internal; import java.util.Map; + import org.opendaylight.controller.clustering.services.ICacheUpdateAware; import org.opendaylight.controller.clustering.services.IClusterGlobalServices; import org.slf4j.Logger; @@ -22,7 +23,7 @@ public class ClusterGlobalManager @Override void setCacheUpdateAware(Map props, ICacheUpdateAware s) { - logger.trace("setCacheUpdateAware"); + logger.trace("setCacheUpdateAware: {}",s); if (props.get("containerName") != null) { // If we got a reference with the containerName property // that is not what we are looking for, so filter it out. @@ -33,7 +34,7 @@ public class ClusterGlobalManager @Override void unsetCacheUpdateAware(Map props, ICacheUpdateAware s) { - logger.trace("unsetCacheUpdateAware"); + logger.trace("unsetCacheUpdateAware: {}",s); if (props.get("containerName") != null) { // If we got a reference with the containerName property // that is not what we are looking for, so filter it out. @@ -41,4 +42,13 @@ public class ClusterGlobalManager } super.unsetCacheUpdateAware(props, s); } + + @Override + public void removeContainerCaches(String containerName) { + logger.debug("Removing caches for container {}", containerName); + for (String cacheName : clusterService.getCacheList(containerName)) { + clusterService.destroyCache(containerName, cacheName); + } + } + }