MetricsDynamicMBeanBase.java 文件源码

java
阅读 26 收藏 0 点赞 0 评论 0

项目:hadoop-oss 作者:
@Override
public Object invoke(String actionName, Object[] parms, String[] signature)
    throws MBeanException, ReflectionException {

  if (actionName == null || actionName.isEmpty()) 
    throw new IllegalArgumentException();


  // Right now we support only one fixed operation (if it applies)
  if (!(actionName.equals(RESET_ALL_MIN_MAX_OP)) || 
      mbeanInfo.getOperations().length != 1) {
    throw new ReflectionException(new NoSuchMethodException(actionName));
  }
  for (MetricsBase m : metricsRegistry.getMetricsList())  {
    if ( MetricsTimeVaryingRate.class.isInstance(m) ) {
      MetricsTimeVaryingRate.class.cast(m).resetMinMax();
    }
  }
  return null;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号