com.yammer.metrics.core.MetricsRegistry.shutdown()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(82)

本文整理了Java中com.yammer.metrics.core.MetricsRegistry.shutdown()方法的一些代码示例,展示了MetricsRegistry.shutdown()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MetricsRegistry.shutdown()方法的具体详情如下:
包路径:com.yammer.metrics.core.MetricsRegistry
类名称:MetricsRegistry
方法名:shutdown

MetricsRegistry.shutdown介绍

[英]Shut down this registry's thread pools.
[中]关闭此注册表的线程池。

代码示例

代码示例来源:origin: org.apache.giraph/giraph-core

/**
  * Nothing will be captured after this is called.
  */
 public void shutdown() {
  registry.shutdown();
 }
}

代码示例来源:origin: com.yammer.metrics/metrics-core

/**
   * Shuts down all thread pools for the default registry.
   */
  public static void shutdown() {
    DEFAULT_REGISTRY.shutdown();
    JmxReporter.shutdownDefault();
    Runtime.getRuntime().removeShutdownHook(SHUTDOWN_HOOK);
  }
}

代码示例来源:origin: com.yammer.metrics/metrics-servlet

@Override
public void contextDestroyed(ServletContextEvent sce) {
  final ServletContext context = sce.getServletContext();
  final Object metricsRegistry = context.getAttribute(MetricsServlet.REGISTRY_ATTRIBUTE);
  if (metricsRegistry instanceof MetricsRegistry) {
    ((MetricsRegistry) metricsRegistry).shutdown();
  } else {
    Metrics.shutdown();
  }
}

代码示例来源:origin: harbby/presto-connectors

public void shutdown() {
 this.reporter.shutdown();
 this.registry.shutdown();
}

代码示例来源:origin: harbby/presto-connectors

@Override
 public String toString() {
  if (prevCell == null)
   return "no data available for statistics";
  // Dump the metrics to the output stream
  simpleReporter.shutdown();
  simpleReporter.run();
  metricsRegistry.shutdown();
  return
      metricsOutput.toString() +
          "Key of biggest row: " + Bytes.toStringBinary(biggestRow);
 }
}

相关文章