class AggregatingTaskManagersMetricsHandler extends AbstractAggregatingMetricsHandler {

	@Override
	protected Collection<? extends MetricStore.ComponentMetricStore> getStores(MetricStore store, Map<String, String> pathParameters, Map<String, String> queryParameters) {
		String taskmanagersList = queryParameters.get("taskmanagers");
		if (taskmanagersList == null || taskmanagersList.isEmpty()) {
			return store.getTaskManagers().values();
		} else {
			String[] taskmanagers = taskmanagersList.split(",");
			Collection<MetricStore.TaskManagerMetricStore> taskmanagerStores = new ArrayList<>();
			for (String taskmanager : taskmanagers) {
				taskmanagerStores.add(store.getTaskManagerMetricStore(taskmanager));
			}
			return taskmanagerStores;
		}
	}

	public  AggregatingTaskManagersMetricsHandler(Executor executor, MetricFetcher fetcher);

}