@Test public void testGetAllVariables() throws Exception { MetricRegistryImpl registry = new MetricRegistryImpl(MetricRegistryConfiguration.defaultMetricRegistryConfiguration()); AbstractMetricGroup group = new AbstractMetricGroup<AbstractMetricGroup<?>>(registry, new String[0], null) { @Override protected QueryScopeInfo createQueryServiceMetricInfo(CharacterFilter filter) { return null; } @Override protected String getGroupName(CharacterFilter filter) { return ""; } }; assertTrue(group.getAllVariables().isEmpty()); registry.shutdown().get(); }
public Map<String, String> getAllVariables() { if (variables == null) { Map<String, String> tmpVariables = new HashMap<>(); putVariables(tmpVariables); if (parent != null) { tmpVariables.putAll(parent.getAllVariables()); } variables = tmpVariables; } return variables; }
AbstractMetricGroup implements MetricGroup { public Map<String, String> getAllVariables() { if (variables == null) { Map<String, String> tmpVariables = new HashMap<>(); putVariables(tmpVariables); if (parent != null) { tmpVariables.putAll(parent.getAllVariables()); } variables = tmpVariables; } return variables; } }
AbstractMetricGroup implements MetricGroup { public Map<String, String> getAllVariables() { if (variables == null) { Map<String, String> tmpVariables = new HashMap<>(); putVariables(tmpVariables); if (parent != null) { tmpVariables.putAll(parent.getAllVariables()); } variables = tmpVariables; } return variables; } AbstractMetricGroup(MetricRegistry registry, String[] scope, A parent); }
AbstractMetricGroup implements MetricGroup { public Map<String, String> getAllVariables() { if (variables == null) { Map<String, String> tmpVariables = new HashMap<>(); putVariables(tmpVariables); if (parent != null) { tmpVariables.putAll(parent.getAllVariables()); } variables = tmpVariables; } return variables; } AbstractMetricGroup(MetricRegistry registry, String[] scope, A parent); Map<String, String> getAllVariables(); String getLogicalScope(CharacterFilter filter); String getLogicalScope(CharacterFilter filter, char delimiter); String[] getScopeComponents(); QueryScopeInfo getQueryServiceMetricInfo(CharacterFilter filter); String getMetricIdentifier(String metricName); String getMetricIdentifier(String metricName, CharacterFilter filter); String getMetricIdentifier(String metricName, CharacterFilter filter, int reporterIndex); void close(); final boolean isClosed(); @Override Counter counter(int name); @Override Counter counter(String name); @Override C counter(int name, C counter); @Override C counter(String name, C counter); @Override G gauge(int name, G gauge); @Override G gauge(String name, G gauge); @Override H histogram(int name, H histogram); @Override H histogram(String name, H histogram); @Override M meter(int name, M meter); @Override M meter(String name, M meter); @Override MetricGroup addGroup(int name); @Override MetricGroup addGroup(String name); @Override MetricGroup addGroup(String key, String value); }
AbstractMetricGroup implements MetricGroup { public Map<String, String> getAllVariables() { if (variables == null) { Map<String, String> tmpVariables = new HashMap<>(); putVariables(tmpVariables); if (parent != null) { tmpVariables.putAll(parent.getAllVariables()); } variables = tmpVariables; } return variables; } AbstractMetricGroup(MetricRegistry registry, String[] scope, A parent); Map<String, String> getAllVariables(); String getLogicalScope(CharacterFilter filter); String getLogicalScope(CharacterFilter filter, char delimiter); String[] getScopeComponents(); QueryScopeInfo getQueryServiceMetricInfo(CharacterFilter filter); String getMetricIdentifier(String metricName); String getMetricIdentifier(String metricName, CharacterFilter filter); String getMetricIdentifier(String metricName, CharacterFilter filter, int reporterIndex); void close(); final boolean isClosed(); @Override Counter counter(int name); @Override Counter counter(String name); @Override C counter(int name, C counter); @Override C counter(String name, C counter); @Override G gauge(int name, G gauge); @Override G gauge(String name, G gauge); @Override H histogram(int name, H histogram); @Override H histogram(String name, H histogram); @Override M meter(int name, M meter); @Override M meter(String name, M meter); @Override MetricGroup addGroup(int name); @Override MetricGroup addGroup(String name); @Override MetricGroup addGroup(String key, String value);  }