Repository: activemq Updated Branches: refs/heads/trunk eaed01992 -> 9a6d444e0
https://issues.apache.org/jira/browse/AMQ-5320 Clean up API docs. Project: http://git-wip-us.apache.org/repos/asf/activemq/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/9a6d444e Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/9a6d444e Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/9a6d444e Branch: refs/heads/trunk Commit: 9a6d444e0a492231ad1f4833448b3bbacd839bce Parents: eaed019 Author: Timothy Bish <[email protected]> Authored: Wed Aug 13 09:50:41 2014 -0400 Committer: Timothy Bish <[email protected]> Committed: Wed Aug 13 09:50:41 2014 -0400 ---------------------------------------------------------------------- .../activemq/management/SizeStatisticImpl.java | 28 ++++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq/blob/9a6d444e/activemq-client/src/main/java/org/apache/activemq/management/SizeStatisticImpl.java ---------------------------------------------------------------------- diff --git a/activemq-client/src/main/java/org/apache/activemq/management/SizeStatisticImpl.java b/activemq-client/src/main/java/org/apache/activemq/management/SizeStatisticImpl.java index d3dbb50..1cf0058 100644 --- a/activemq-client/src/main/java/org/apache/activemq/management/SizeStatisticImpl.java +++ b/activemq-client/src/main/java/org/apache/activemq/management/SizeStatisticImpl.java @@ -16,7 +16,8 @@ */ package org.apache.activemq.management; -public class SizeStatisticImpl extends StatisticImpl{ +public class SizeStatisticImpl extends StatisticImpl { + private long count; private long maxSize; private long minSize; @@ -36,8 +37,9 @@ public class SizeStatisticImpl extends StatisticImpl{ super(name, unit, description); } + @Override public synchronized void reset() { - if(isDoReset()) { + if (isDoReset()) { super.reset(); count = 0; maxSize = 0; @@ -66,29 +68,29 @@ public class SizeStatisticImpl extends StatisticImpl{ } /** - * @return the maximum time of any step + * @return the maximum size of any step */ public long getMaxSize() { return maxSize; } /** - * @return the minimum time of any step + * @return the minimum size of any step */ public synchronized long getMinSize() { return minSize; } /** - * @return the total time of all the steps added together + * @return the total size of all the steps added together */ public synchronized long getTotalSize() { return totalSize; } /** - * @return the average time calculated by dividing the - * total time by the number of counts + * @return the average size calculated by dividing the total size by the + * number of counts */ public synchronized double getAverageSize() { if (count == 0) { @@ -98,11 +100,9 @@ public class SizeStatisticImpl extends StatisticImpl{ return d / count; } - /** - * @return the average time calculated by dividing the - * total time by the number of counts but excluding the - * minimum and maximum times. + * @return the average size calculated by dividing the total size by the + * number of counts but excluding the minimum and maximum sizes. */ public synchronized double getAverageSizeExcludingMinMax() { if (count <= 2) { @@ -112,7 +112,6 @@ public class SizeStatisticImpl extends StatisticImpl{ return d / (count - 2); } - /** * @return the average number of steps per second */ @@ -126,7 +125,8 @@ public class SizeStatisticImpl extends StatisticImpl{ } /** - * @return the average number of steps per second excluding the min & max values + * @return the average number of steps per second excluding the min & max + * values */ public double getAveragePerSecondExcludingMinMax() { double d = 1000; @@ -145,6 +145,7 @@ public class SizeStatisticImpl extends StatisticImpl{ this.parent = parent; } + @Override protected synchronized void appendFieldDescription(StringBuffer buffer) { buffer.append(" count: "); buffer.append(Long.toString(count)); @@ -164,5 +165,4 @@ public class SizeStatisticImpl extends StatisticImpl{ buffer.append(Double.toString(getAveragePerSecondExcludingMinMax())); super.appendFieldDescription(buffer); } - }
