class DetectorServiceImpl implements DetectorService {

    @Override
    public void updateDetectorTrainingTime(String uuid, long nextRun) {
        notNull(uuid, "uuid can't be null");
        MDC.put("DetectorUuid", uuid);
        Detector detectorToBeUpdated = repository.findByUuid(uuid);
        TrainingMetaData updatedTrainingTimeMeta = DetectorDataUtil.buildUpdatedRuntimeTrainingMeta(
            detectorToBeUpdated, nextRun);
        detectorToBeUpdated.getDetectorConfig().setTrainingMetaData(updatedTrainingTimeMeta);
        repository.save(detectorToBeUpdated);
    }

}