Bug-4957 Cluster Role change fix
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / device / DeviceStateImpl.java
index 0a69374b5807040517c59797f2c05281baf65b0c..d49021ed1e067e1e508b2617f9f148b6dfb2332c 100644 (file)
@@ -46,6 +46,7 @@ class DeviceStateImpl implements DeviceState {
     private boolean flowStatisticsAvailable;
     private boolean tableStatisticsAvailable;
     private boolean portStatisticsAvailable;
+    private boolean statPollEnabled;
     private boolean queueStatisticsAvailable;
     private volatile OfpRole role;
 
@@ -55,6 +56,8 @@ class DeviceStateImpl implements DeviceState {
         this.nodeId = Preconditions.checkNotNull(nodeId);
         nodeII = DeviceStateUtil.createNodeInstanceIdentifier(nodeId);
         version = featuresReply.getVersion();
+        statPollEnabled = false;
+        deviceSynchronized = false;
     }
 
     @Override
@@ -167,4 +170,14 @@ class DeviceStateImpl implements DeviceState {
     public void setRole(OfpRole role) {
         this.role = role;
     }
+
+    @Override
+    public boolean isStatisticsPollingEnabled() {
+        return statPollEnabled;
+    }
+
+    @Override
+    public void setStatisticsPollingEnabledProp(final boolean statPollEnabled) {
+        this.statPollEnabled = statPollEnabled;
+    }
 }