@Override public void onNotification(Notification notification) throws TException { LOG.debug("Received Notification from control service {}", notification); LOG.debug("Going to notify cache service.."); processCacheNotification(notification); if (notification.getOp() != Operation.APP_UPDATE) { LOG.debug("Going to notify akka service.."); akkaService.onNotification(notification); } }
protected void processLogAppenderNotification(Notification notification) { LOG.debug("Process log appender notification [{}]", notification); String appenderId = notification.getAppenderId(); switch (notification.getOp()) { case ADD_LOG_APPENDER: addLogAppender(appenderId); break; case REMOVE_LOG_APPENDER: removeLogAppender(appenderId); break; case UPDATE_LOG_APPENDER: removeLogAppender(appenderId); addLogAppender(appenderId); break; default: LOG.debug("[{}][{}] Operation [{}] is not supported.", applicationToken, appenderId, notification.getOp()); } }
/** * Process a notification. * * @param notification notification */ public void processNotification(Notification notification) { LOG.debug("Process user verifier notification [{}]", notification); String verifierToken = notification.getUserVerifierToken(); switch (notification.getOp()) { case ADD_USER_VERIFIER: addUserVerifier(verifierToken); break; case REMOVE_USER_VERIFIER: removeUserVerifier(verifierToken); break; case UPDATE_USER_VERIFIER: removeUserVerifier(verifierToken); addUserVerifier(verifierToken); break; default: LOG.debug("[{}][{}] Operation [{}] is not supported.", applicationId, verifierToken, notification.getOp()); } }
return getOp();
LOG.debug("Processing cache notification {} for app {}", notification, appDto); if (appDto != null) { if (notification.getOp() == Operation.APP_UPDATE) { LOG.debug("Reseting application info {}", appDto.getId()); cacheService.resetAppById(appDto.getId());