public void updateData(T update) throws AmbariException {
    try {
      data.compute(update.getHostId(), (id, current) -> {
        if (current == null) {
          current = initializeData(id, true);
        }
        T updated;
        try {
          updated = handleUpdate(current, update);
        } catch (AmbariException e) {
          LOG.error("Error during handling update for host: {} and class {}", id, getClass().getName(), e);
          throw new AmbariRuntimeException("Error during handling update for host: " + id + " and class: " + getClass().getName(), e);
        }
        if (updated == null) {
          return current;
        } else {
          regenerateDataIdentifiers(updated);
          setIdentifiersToEventUpdate(update, updated);
          return updated;
        }
      });
    } catch(AmbariRuntimeException e) {
      throw new AmbariException(e.getMessage(), e);
    }
    if (isIdentifierValid(update)) {
      if (update.getType().equals(STOMPEvent.Type.AGENT_CONFIGS)) {
        LOG.info("Configs update with hash {} will be sent to host {}", update.getHash(), update.getHostId());
      }
      STOMPUpdatePublisher.publish(update);
    }
  }
Apply an incremental update to the data (host-specific), and publish the
event to listeners.
ambari-server/src/main/java/org/apache/ambari/server/agent/stomp/AgentHostDataHolder.java