public void addStaleAlerts(Long hostId, List<StaleAlert> staleAlertsDefinitionId) {
    staleAlerts.put(hostId, new ConcurrentHashMap<>());
    ConcurrentMap<Long, Long> hostStaleAlerts = staleAlerts.get(hostId);
    staleAlertsDefinitionId.forEach(s -> hostStaleAlerts.put(s.getId(), s.getTimestamp()));
  }
Saves stale alerts for specified host.
@param hostId host id
@param staleAlertsDefinitionId list of stale alerts
ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertHelper.java