/** * Checks the last notification processed by sentry and the current event-id of * HMS to see if sentry is out of sync. * * @param latestSentryNotificationId The notification Id to check against the HMS * @return True, sentry is out-of-sync, False otherwise * @throws Exception If an error occurs while fetching the current notification from HMS */ private boolean isSentryOutOfSync(long latestSentryNotificationId) throws Exception { long currentHmsNotificationId = notificationFetcher.getCurrentNotificationId(); if (currentHmsNotificationId < latestSentryNotificationId) { LOGGER.info("The current notification ID on HMS = {} is less than the latest processed Sentry " + "notification ID = {}. Sentry, Out-of-sync", currentHmsNotificationId, latestSentryNotificationId); return true; } return false; }