Split out statistics tracking into separate classes
[controller.git] / opendaylight / md-sal / statistics-manager / src / main / java / org / opendaylight / controller / md / statistics / manager / StatisticsProvider.java
index d8ee80a10f4f6f3895bbd1c150022cffa852ad8b..e9d2356cf9552f560b582747e6f3c66a59452cb3 100644 (file)
@@ -156,7 +156,9 @@ public class StatisticsProvider implements AutoCloseable {
             public void run() {
                 try {
                     // Send stats requests
-                    statsRequestSender();
+                    for (NodeStatisticsHandler h : handlers.values()) {
+                        sendStatisticsRequestsToNode(h);
+                    }
 
                     // Perform cleanup
                     for(NodeStatisticsHandler nodeStatisticsAger : handlers.values()){
@@ -209,12 +211,6 @@ public class StatisticsProvider implements AutoCloseable {
         return dps.beginTransaction();
     }
 
-    private void statsRequestSender() {
-        for (NodeStatisticsHandler h : handlers.values()) {
-            sendStatisticsRequestsToNode(h);
-        }
-    }
-
     private void sendStatisticsRequestsToNode(final NodeStatisticsHandler h) {
         NodeKey targetNode = h.getTargetNodeKey();
         spLogger.debug("Send requests for statistics collection to node : {}", targetNode.getId());