protected void findUpdatedDoc(Map<String, Object> message0, String guid, String sensorType)
throws InterruptedException, IOException, OriginalNotFoundException {
commit();
for (int t = 0; t < MAX_RETRIES; ++t, Thread.sleep(SLEEP_MS)) {
Document doc = metaDao.getLatest(guid, sensorType);
convertAlertsFieldToSet(doc.getDocument());
convertAlertsFieldToSet(message0);
if (doc.getDocument() != null && message0.equals(doc.getDocument())) {
convertAlertsFieldToList(doc.getDocument());
convertAlertsFieldToList(message0);
return;
}
}
throw new OriginalNotFoundException(
"Count not find " + guid + " after " + MAX_RETRIES + " tries");
}