public AlertCurrentEntity findCurrentByHostAndName(long clusterId, String hostName,
      String alertName) {

    if( m_configuration.isAlertCacheEnabled() ){
      AlertCacheKey key = new AlertCacheKey(clusterId, alertName, hostName);

      try {
        return m_currentAlertCache.get(key);
      } catch (ExecutionException executionException) {
        Throwable cause = executionException.getCause();
        if (!(cause instanceof AlertNotYetCreatedException)) {
          LOG.warn("Unable to retrieve alert for key {} from the cache", key);
        }
      }
    }

    return findCurrentByHostAndNameInJPA(clusterId, hostName, alertName);
  }
Locate the current alert for the provided service and alert name. This
method will first consult the cache if configured with
{@link Configuration#isAlertCacheEnabled()}.

@param clusterId
         the cluster id
@param hostName
         the name of the host (not {@code null}).
@param alertName
         the name of the alert (not {@code null}).
@return the current record, or {@code null} if not found
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java