public void updateAlertDefinition(StatAlertDefinition[] defns, int actionCode) {
    if (logger.isDebugEnabled()) {
      logger.debug("Entered StatAlertsManager.updateAlertDefinition *****");
    }
    synchronized (alertDefinitionsMap) {
      if (actionCode == UpdateAlertDefinitionMessage.REMOVE_ALERT_DEFINITION) {
        for (final StatAlertDefinition defn : defns) {
          alertDefinitionsMap.remove(defn.getId());
          if (logger.isDebugEnabled()) {
            logger.debug("Removed StatAlertDefinition: {}", defn.getName());
          }
        }
      } else {
        StatAlertDefinition[] alertDefns = createMemberStatAlertDefinition(dm, defns);
        StatAlertDefinition defn;
        for (int i = 0; i < alertDefns.length; i++) {
          defn = alertDefns[i];
          alertDefinitionsMap.put(defns[i].getId(), defn);
        }
      }
    } // synchronized

    if (logger.isDebugEnabled()) {
      logger.debug("Exiting StatAlertsManager.updateAlertDefinition *****");
    }
  }
Update the alert's definition map

@param defns Alert definitions
@param actionCode Action to be performed like add , remove or update alert's definition

@see UpdateAlertDefinitionMessage
geode-core/src/main/java/org/apache/geode/internal/admin/StatAlertsManager.java