Clean up API docs.
This commit is contained in:
Timothy Bish 2014-08-13 09:50:41 -04:00
parent eaed01992e
commit 9a6d444e0a
1 changed files with 14 additions and 14 deletions

View File

@ -16,7 +16,8 @@
*/ */
package org.apache.activemq.management; package org.apache.activemq.management;
public class SizeStatisticImpl extends StatisticImpl{ public class SizeStatisticImpl extends StatisticImpl {
private long count; private long count;
private long maxSize; private long maxSize;
private long minSize; private long minSize;
@ -36,8 +37,9 @@ public class SizeStatisticImpl extends StatisticImpl{
super(name, unit, description); super(name, unit, description);
} }
@Override
public synchronized void reset() { public synchronized void reset() {
if(isDoReset()) { if (isDoReset()) {
super.reset(); super.reset();
count = 0; count = 0;
maxSize = 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() { public long getMaxSize() {
return maxSize; return maxSize;
} }
/** /**
* @return the minimum time of any step * @return the minimum size of any step
*/ */
public synchronized long getMinSize() { public synchronized long getMinSize() {
return minSize; 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() { public synchronized long getTotalSize() {
return totalSize; return totalSize;
} }
/** /**
* @return the average time calculated by dividing the * @return the average size calculated by dividing the total size by the
* total time by the number of counts * number of counts
*/ */
public synchronized double getAverageSize() { public synchronized double getAverageSize() {
if (count == 0) { if (count == 0) {
@ -98,11 +100,9 @@ public class SizeStatisticImpl extends StatisticImpl{
return d / count; return d / count;
} }
/** /**
* @return the average time calculated by dividing the * @return the average size calculated by dividing the total size by the
* total time by the number of counts but excluding the * number of counts but excluding the minimum and maximum sizes.
* minimum and maximum times.
*/ */
public synchronized double getAverageSizeExcludingMinMax() { public synchronized double getAverageSizeExcludingMinMax() {
if (count <= 2) { if (count <= 2) {
@ -112,7 +112,6 @@ public class SizeStatisticImpl extends StatisticImpl{
return d / (count - 2); return d / (count - 2);
} }
/** /**
* @return the average number of steps per second * @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() { public double getAveragePerSecondExcludingMinMax() {
double d = 1000; double d = 1000;
@ -145,6 +145,7 @@ public class SizeStatisticImpl extends StatisticImpl{
this.parent = parent; this.parent = parent;
} }
@Override
protected synchronized void appendFieldDescription(StringBuffer buffer) { protected synchronized void appendFieldDescription(StringBuffer buffer) {
buffer.append(" count: "); buffer.append(" count: ");
buffer.append(Long.toString(count)); buffer.append(Long.toString(count));
@ -164,5 +165,4 @@ public class SizeStatisticImpl extends StatisticImpl{
buffer.append(Double.toString(getAveragePerSecondExcludingMinMax())); buffer.append(Double.toString(getAveragePerSecondExcludingMinMax()));
super.appendFieldDescription(buffer); super.appendFieldDescription(buffer);
} }
} }