Merge "Removed duplicate sal-binding-config dependency."
[openflowplugin.git] / applications / forwardingrules-sync / src / main / java / org / opendaylight / openflowplugin / applications / frsync / util / SyncCrudCounters.java
index 34a670c1b6651b0b03ff619c60ebc623a669bcfd..487f0650828d1e0d7b9434ca1a36f3092fb65c13 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.applications.frsync.util;
 
 /**
@@ -16,6 +15,7 @@ public class SyncCrudCounters {
     private final CrudCounts flowCrudCounts;
     private final CrudCounts groupCrudCounts;
     private final CrudCounts meterCrudCounts;
+    private long startNano;
 
     public SyncCrudCounters() {
         flowCrudCounts = new CrudCounts();
@@ -35,4 +35,26 @@ public class SyncCrudCounters {
         return meterCrudCounts;
     }
 
+
+    public long getStartNano() {
+        return startNano;
+    }
+
+    public void setStartNano(final long startNano) {
+        this.startNano = startNano;
+    }
+
+    public void resetAll() {
+        getGroupCrudCounts().setUpdated(0);
+        getGroupCrudCounts().setAdded(0);
+        getGroupCrudCounts().setRemoved(0);
+
+        getFlowCrudCounts().setUpdated(0);
+        getFlowCrudCounts().setAdded(0);
+        getFlowCrudCounts().setRemoved(0);
+
+        getMeterCrudCounts().setUpdated(0);
+        getMeterCrudCounts().setAdded(0);
+        getMeterCrudCounts().setRemoved(0);
+    }
 }