Merge "Migrating caches to TRANSACTIONAL Caches and enabled use1PcForAutoCommitTransa...
[controller.git] / opendaylight / switchmanager / implementation / src / main / java / org / opendaylight / controller / switchmanager / internal / Activator.java
index b574269e450e46b2ee39b532208aadc00c024a4d..e81b4cd27e9d2713db0c787eebdb27531d04de28 100644 (file)
@@ -15,12 +15,12 @@ import java.util.Hashtable;
 import java.util.Set;
 
 import org.apache.felix.dm.Component;
-import org.opendaylight.controller.clustering.services.ICacheUpdateAware;
 import org.opendaylight.controller.clustering.services.IClusterContainerServices;
 import org.opendaylight.controller.configuration.IConfigurationContainerAware;
 import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase;
 import org.opendaylight.controller.sal.inventory.IInventoryService;
 import org.opendaylight.controller.sal.inventory.IListenInventoryUpdates;
+import org.opendaylight.controller.statisticsmanager.IStatisticsManager;
 import org.opendaylight.controller.switchmanager.IInventoryListener;
 import org.opendaylight.controller.switchmanager.ISpanAware;
 import org.opendaylight.controller.switchmanager.ISwitchManager;
@@ -89,16 +89,11 @@ public class Activator extends ComponentActivatorAbstractBase {
     @Override
     public void configureInstance(Component c, Object imp, String containerName) {
         if (imp.equals(SwitchManager.class)) {
-            Dictionary<String, Set<String>> props = new Hashtable<String, Set<String>>();
-            Set<String> propSet = new HashSet<String>();
-            propSet.add("switchmanager.configSaveEvent");
-            props.put("cachenames", propSet);
             // export the service
             c.setInterface(new String[] {
                     IListenInventoryUpdates.class.getName(),
                     ISwitchManager.class.getName(),
-                    ICacheUpdateAware.class.getName(),
-                    IConfigurationContainerAware.class.getName() }, props);
+                    IConfigurationContainerAware.class.getName() }, null);
 
             // Now lets add a service dependency to make sure the
             // provider of service exists
@@ -106,6 +101,10 @@ public class Activator extends ComponentActivatorAbstractBase {
                     IInventoryService.class).setCallbacks(
                     "setInventoryService", "unsetInventoryService")
                     .setRequired(false));
+            c.add(createContainerServiceDependency(containerName).setService(
+                    IStatisticsManager.class).setCallbacks(
+                    "setStatisticsManager", "unsetStatisticsManager")
+                    .setRequired(false));
             c.add(createContainerServiceDependency(containerName).setService(
                     ISwitchManagerAware.class).setCallbacks(
                     "setSwitchManagerAware", "unsetSwitchManagerAware")