class DataInitializer {

    public void initializeDetector(MappedMetricData mappedMetricData, Detector detector, DetectorMapping detectorMapping) {
        // TODO: Forecasting Detector initialisation is currently limited to Seasonal Naive detector and assumes Graphite source
        if (isSeasonalNaiveDetector(detector)) {
            if (throttleGate.isOpen()) {
                log.info("Throttle gate is open, initializing data and creating a detector");
                val forecastingDetector = (ForecastingDetector) detector;
                initializeForecastingDetector(mappedMetricData, forecastingDetector, detectorMapping);
            } else {
                String message = "Throttle gate is closed, skipping data initialization";
                log.info(message);
                throw new DetectorDataInitializationThrottledException(message);
            }
        }
    }

    public  DataInitializer(Config config, ThrottleGate throttleGate, DataSource dataSource);

}