3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 package org.opendaylight.controller.clustering.services_implementation.internal;
13 import org.opendaylight.controller.clustering.services.ICacheUpdateAware;
14 import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
15 import org.slf4j.Logger;
16 import org.slf4j.LoggerFactory;
18 public class ClusterGlobalManager
19 extends ClusterManagerCommon
20 implements IClusterGlobalServices {
21 protected static final Logger logger = LoggerFactory.getLogger(ClusterGlobalManager.class);
24 void setCacheUpdateAware(Map props, ICacheUpdateAware s) {
25 logger.trace("setCacheUpdateAware");
26 if (props.get("containerName") != null) {
27 // If we got a reference with the containerName property
28 // that is not what we are looking for, so filter it out.
31 super.setCacheUpdateAware(props, s);
35 void unsetCacheUpdateAware(Map props, ICacheUpdateAware s) {
36 logger.trace("unsetCacheUpdateAware");
37 if (props.get("containerName") != null) {
38 // If we got a reference with the containerName property
39 // that is not what we are looking for, so filter it out.
42 super.unsetCacheUpdateAware(props, s);
46 public void removeContainerCaches(String containerName) {
47 logger.debug("Removing caches for container {}", containerName);
48 for (String cacheName : clusterService.getCacheList(containerName)) {
49 clusterService.destroyCache(containerName, cacheName);