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;
14 import org.opendaylight.controller.clustering.services.ICacheUpdateAware;
15 import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
16 import org.slf4j.Logger;
17 import org.slf4j.LoggerFactory;
19 public class ClusterGlobalManager
20 extends ClusterManagerCommon
21 implements IClusterGlobalServices {
22 protected static final Logger logger = LoggerFactory.getLogger(ClusterGlobalManager.class);
25 void setCacheUpdateAware(Map props, ICacheUpdateAware s) {
26 logger.trace("setCacheUpdateAware: {}",s);
27 if (props.get("containerName") != null) {
28 // If we got a reference with the containerName property
29 // that is not what we are looking for, so filter it out.
32 super.setCacheUpdateAware(props, s);
36 void unsetCacheUpdateAware(Map props, ICacheUpdateAware s) {
37 logger.trace("unsetCacheUpdateAware: {}",s);
38 if (props.get("containerName") != null) {
39 // If we got a reference with the containerName property
40 // that is not what we are looking for, so filter it out.
43 super.unsetCacheUpdateAware(props, s);
47 public void removeContainerCaches(String containerName) {
48 logger.debug("Removing caches for container {}", containerName);
49 for (String cacheName : clusterService.getCacheList(containerName)) {
50 clusterService.destroyCache(containerName, cacheName);