Merge "BUG-6890:Flow-Removed Notification configuration"
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / OpenFlowPluginProviderImpl.java
index cefeee4aaed326c213465abb564406f13bdd9551..979fb0a842c569d782b44bba98dcf7397eed59fc 100644 (file)
@@ -90,9 +90,9 @@ public class OpenFlowPluginProviderImpl implements OpenFlowPluginProvider, OpenF
     private DataBroker dataBroker;
     private Collection<SwitchConnectionProvider> switchConnectionProviders;
     private boolean switchFeaturesMandatory = false;
-    private boolean isStatisticsPollingOff = false;
+    private boolean isStatisticsPollingOn = true;
     private boolean isStatisticsRpcEnabled;
-    private boolean isNotificationFlowRemovedOff = false;
+    private boolean isFlowRemovedNotificationOn = true;
     private boolean skipTableFeatures = true;
 
     private final ThreadPoolExecutor threadPool;
@@ -119,13 +119,13 @@ public class OpenFlowPluginProviderImpl implements OpenFlowPluginProvider, OpenF
     }
 
     @Override
-    public boolean isStatisticsPollingOff() {
-        return isStatisticsPollingOff;
+    public boolean isStatisticsPollingOn() {
+        return isStatisticsPollingOn;
     }
 
     @Override
-    public void setIsStatisticsPollingOff(final boolean isStatisticsPollingOff) {
-        this.isStatisticsPollingOff = isStatisticsPollingOff;
+    public void setStatisticsPollingOn(final boolean isStatisticsPollingOn) {
+        this.isStatisticsPollingOn = isStatisticsPollingOn;
     }
 
     private void startSwitchConnections() {
@@ -172,8 +172,8 @@ public class OpenFlowPluginProviderImpl implements OpenFlowPluginProvider, OpenF
     }
 
     @Override
-    public void setNotificationFlowRemovedOff(boolean isNotificationFlowRemovedOff) {
-        this.isNotificationFlowRemovedOff = isNotificationFlowRemovedOff;
+    public void setFlowRemovedNotification(boolean isFlowRemovedNotificationOn) {
+        this.isFlowRemovedNotificationOn = this.isFlowRemovedNotificationOn;
     }
 
     @Override
@@ -232,7 +232,7 @@ public class OpenFlowPluginProviderImpl implements OpenFlowPluginProvider, OpenF
                 barrierInterval,
                 barrierCountLimit,
                 getMessageIntelligenceAgency(),
-                isNotificationFlowRemovedOff,
+                isFlowRemovedNotificationOn,
                 singletonServicesProvider,
                 notificationPublishService,
                 hashedWheelTimer,
@@ -242,7 +242,7 @@ public class OpenFlowPluginProviderImpl implements OpenFlowPluginProvider, OpenF
         ((ExtensionConverterProviderKeeper) deviceManager).setExtensionConverterProvider(extensionConverterManager);
 
         rpcManager = new RpcManagerImpl(rpcProviderRegistry, rpcRequestsQuota, extensionConverterManager, convertorManager, notificationPublishService);
-        statisticsManager = new StatisticsManagerImpl(rpcProviderRegistry, isStatisticsPollingOff, hashedWheelTimer, convertorManager);
+        statisticsManager = new StatisticsManagerImpl(rpcProviderRegistry, isStatisticsPollingOn, hashedWheelTimer, convertorManager);
 
         /* Initialization Phase ordering - OFP Device Context suite */
         // CM -> DM -> SM -> RPC -> Role -> DM
@@ -270,7 +270,7 @@ public class OpenFlowPluginProviderImpl implements OpenFlowPluginProvider, OpenF
 
         if(deviceManager != null) {
             if (props.containsKey("notification-flow-removed-off")) {
-                deviceManager.setIsNotificationFlowRemovedOff(Boolean.valueOf(props.get("notification-flow-removed-off").toString()));
+                deviceManager.setFlowRemovedNotificationOn(Boolean.valueOf(props.get("enable-flow-removed-notification").toString()));
             }
             if (props.containsKey("skip-table-features")) {
                 deviceManager.setSkipTableFeatures(Boolean.valueOf(props.get("skip-table-features").toString()));
@@ -303,8 +303,8 @@ public class OpenFlowPluginProviderImpl implements OpenFlowPluginProvider, OpenF
             }
         }
 
-        if(statisticsManager != null && props.containsKey("is-statistics-polling-off")){
-            statisticsManager.setIsStatisticsPollingOff(Boolean.valueOf(props.get("is-statistics-polling-off").toString()));
+        if(statisticsManager != null && props.containsKey("is-statistics-polling-on")){
+            statisticsManager.setIsStatisticsPollingOn(Boolean.valueOf(props.get("is-statistics-polling-on").toString()));
         }
     }