-
Notifications
You must be signed in to change notification settings - Fork 96
/
MetricLoader.java
28 lines (24 loc) · 1.3 KB
/
MetricLoader.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2016 Yahoo Inc.
// Licensed under the terms of the Apache license. Please see LICENSE.md file distributed with this work for terms.
package com.yahoo.bard.webservice.data.config.metric;
import com.yahoo.bard.webservice.data.dimension.DimensionDictionary;
import com.yahoo.bard.webservice.data.metric.MetricDictionary;
import org.slf4j.LoggerFactory;
/**
* Defines the core interactions for loading metrics into a metric dictionary.
*/
public interface MetricLoader {
/**
* Load metrics and populate the metric dictionary with dimension dictionary for dimension dependent metrics.
*
* @param metricDictionary The dictionary that will be loaded with metrics
* @param dimensionDictionary The dimension dictionary containing loaded dimensions
*/
default void loadMetricDictionary(MetricDictionary metricDictionary, DimensionDictionary dimensionDictionary) {
// This implementation will be removed after a future release
String message = "loadMetricDictionary(MetricDictionary) is not implemented. It has been deprecated. " +
"Implement and use loadMetricDictionary(MetricDictionary, DimensionDictionary) instead.";
LoggerFactory.getLogger(MetricLoader.class).error(message);
throw new UnsupportedOperationException(message);
}
}