class AbstractMetricGroup implements MetricGroup {

	public Map<String, String> getAllVariables() {
		if (variables == null) { // avoid synchronization for common case
			synchronized (this) {
				if (variables == null) {
					variables = new HashMap<>();
					putVariables(variables);
					if (parent != null) { // not true for Job-/TaskManagerMetricGroup and mocks
						variables.putAll(parent.getAllVariables());
					}
				}
			}
		}
		return variables;
	}

	public  AbstractMetricGroup(MetricRegistry registry, String[] scope, A parent);

}