class DetectorManager {

    List<UUID> detectorCacheSync(long currentTime) {
        List<UUID> updatedDetectors = new ArrayList<>();
        long updateDurationInSeconds = (currentTime - cacheSyncedTillTime) / 1000;

        if (updateDurationInSeconds <= 0) {
            return updatedDetectors;
        }

        detectorSource.findUpdatedDetectors(updateDurationInSeconds).forEach(key -> {
            if (cachedDetectors.containsKey(key)) {
                cachedDetectors.remove(key);
                updatedDetectors.add(key);
            }
        });

        if (!updatedDetectors.isEmpty()) {
            log.info("Removed these updated detectors from cache (so they can be reloaded at time of next metric observation): {}", updatedDetectors);
        }
        cacheSyncedTillTime = currentTime;
        return updatedDetectors;
    }

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

}