JConsole support for statistics collection
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / statistics / Counter.java
index 9d7ddc77e50fe194948f2126e81c5c12d31b84ce..c5f187293b9e843a239f24dd0981aba7b9574ece 100644 (file)
@@ -73,8 +73,10 @@ public class Counter {
         counterLastReadValue.set(0l);\r
     }\r
 \r
-    @Override\r
-    public String toString() {\r
+    /**\r
+     * @return last and current count for specified statistic\r
+     */\r
+    public String getStat() {\r
         long cntPrevVal = getCounterLastReadValue();\r
         long cntCurValue = getCounterValue();\r
         return String.format("+%d | %d",cntCurValue-cntPrevVal,cntCurValue);\r