public Collection<LogicalRequest> getRequests(Collection<Long> requestIds) {
    ensureInitialized();
    if (requestIds.isEmpty()) {
      return allRequests.values();
    } else {
      Collection<LogicalRequest> matchingRequests = new ArrayList<>();
      for (long id : requestIds) {
        LogicalRequest request = allRequests.get(id);
        if (request != null) {
          matchingRequests.add(request);
        }
      }
      return matchingRequests;
    }
  }
Through this method {@see TopologyManager} gets notified when a connection to a host in the cluster is lost.
The passed host will be excluded from scheduling any tasks onto it as it can't be reached.
@param host
ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java