AMQ-5521: Average message size attribute on destination mbean should not have decimals

This commit is contained in:
Claus Ibsen 2015-01-16 09:22:28 +01:00
parent 3ec36818eb
commit dbf2c28b96
2 changed files with 4 additions and 4 deletions

View File

@ -161,8 +161,9 @@ public class DestinationView implements DestinationViewMBean {
/**
* @return the average size of a message (bytes)
*/
public double getAverageMessageSize() {
return destination.getDestinationStatistics().getMessageSize().getAverageSize();
public long getAverageMessageSize() {
// we are okay with the size without decimals so cast to long
return (long) destination.getDestinationStatistics().getMessageSize().getAverageSize();
}
/**

View File

@ -264,12 +264,11 @@ public interface DestinationViewMBean {
@MBeanInfo("The shortest time a message has been held this destination.")
long getMinEnqueueTime();
@MBeanInfo("Average time a message has been held this destination.")
double getAverageEnqueueTime();
@MBeanInfo("Average message size on this destination")
double getAverageMessageSize();
long getAverageMessageSize();
@MBeanInfo("Max message size on this destination")
public long getMaxMessageSize();