public void flushCachedEntitiesToJPA() {
    if (m_configuration.isAlertCacheEnabled()) {
      synchronized (this) {
        flushCachedEntitiesToJPATransactional();
      }
    } else {
      LOG.warn("Unable to flush cached alerts to JPA because caching is not enabled");
    }
  }
Writes all cached {@link AlertCurrentEntity} instances to the database and
clears the cache.
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java