class DetectorManager {

    public DetectorResult detect(@NonNull MappedMetricData mappedMetricData) {
        try {
            MDC.put("DetectorUuid", mappedMetricData.getDetectorUuid().toString());
            checkMappedMetricData(mappedMetricData);
            Optional<DetectorContainer> container = getDetector(mappedMetricData);
            if (container.isPresent()) {
                Optional<DetectorResult> optionalDetectorResult = doDetection(container.get(), mappedMetricData.getMetricData());
                return optionalDetectorResult.orElse(null);
            } else {
                return null;
            }
        } finally {
            MDC.remove("DetectorUuid");
        }
    }

    public  DetectorManager(DetectorSource detectorSource,
                           DataInitializer dataInitializer,
                           Config config,
                           Map<UUID, DetectorContainer> cachedDetectors,
                           MetricRegistry metricRegistry);
    public  DetectorManager(DetectorSource detectorSource,
                           DataInitializer dataInitializer,
                           Config config,
                           MetricRegistry metricRegistry);

}