code: public long getStatValueAsLong(T metric, String interval) {
          if (metric.isRateMetric()) {
              return (long)(getStatValueAsDouble(metric, interval));
          }
          return getMonitoredStatValue(metric).getValueAsLong(interval);
      }
docs: Get value of provided metric for the given interval as long value.
  @param metric metric which value we wanna get
  @param interval the name of the Interval or <code>null</code> to get the absolute value
  @return the current value