class AbstractCompositeMetrics {

  @Nullable
  public Metrics getMetrics(@NonNull String name) {
    Deque<Metrics> metrics = metricsMap.get(name.trim());
    synchronized (this) {
      return metrics != null && !metrics.isEmpty() ? metrics.pop() : null;
    }
  }

  public  AbstractCompositeMetrics(long maxLength);

}