@ManagedOperation( description = "Returns the raw value for the statistic", displayName = "Get Statistic Value") public final double getStatisticValue( @Parameter(description = "Statistic name") String statName) { if (statName == null) { return 0; } for (ExtendedStatistic statistic : ExtendedStatistic.values()) { if (statistic.name().equalsIgnoreCase(statName)) { return getAttribute(statistic); } } return 0; }
@ManagedAttribute( description = "Returns all the available statistics", displayName = "Available Statistics") public final String getAvailableExtendedStatistics() { return Arrays.toString(ExtendedStatistic.values()); }