class MetricsManager {

  public synchronized void useMetrics(List<MetricData> metricsList) {
    if (!isMetricsEnabled) {
      return;
    }
    LOG.info("useMetrics() metrics.size=" + metricsList.size());
    long currMS = System.currentTimeMillis();
    
    gatherMetrics(metricsList, currMS);
    publishMetrics(currMS);
  }

}