if (!(provider instanceof AdvisorySource)) {
// Nothing to do.
return tracker;
}
AdvisorySource advisorySource = (AdvisorySource) provider;
log.error("Synchronize Advisory: [" + source.getName() + "]: syncing repo [" + repo.getName() + "]");
long start = System.currentTimeMillis();
List<Advisory> advs = repoManager.findAssociatedAdvisory(overlord, repo.getId(), pc);
log.error("Found " + advs.size() + " advisories for repo " + repo.getId());
ThreadUtil.checkInterrupted();
AdvisorySyncReport advReport = new AdvisorySyncReport(repo.getId());
List<AdvisoryDetails> advDetails = new ArrayList<AdvisoryDetails>(advs.size());
translateDomainToDto(advs, advDetails);
ThreadUtil.checkInterrupted();
log.error("Synchronize Advisory: [" + source.getName() + "]: loaded existing list of size=[" + advs.size()
+ "] (" + (System.currentTimeMillis() - start) + ")ms");
// Ask source to do the sync
// --------------------------------------------
start = System.currentTimeMillis();
advisorySource.synchronizeAdvisory(repo.getName(), advReport, advDetails);
ThreadUtil.checkInterrupted();
log.error("Synchronize Advisory: [" + source.getName() + "]: got sync report from adapter=[" + advReport
+ "] (" + (System.currentTimeMillis() - start) + ")ms");