class LogicalRequest extends Request {

  public Collection<HostRequest> removePendingHostRequests(String hostGroupName) {
    Collection<HostRequest> pendingHostRequests = new ArrayList<>();
    for(HostRequest hostRequest : outstandingHostRequests) {
      if(hostGroupName == null || hostRequest.getHostgroupName().equals(hostGroupName)) {
        pendingHostRequests.add(hostRequest);
      }
    }
    if (hostGroupName == null) {
      outstandingHostRequests.clear();
    } else {
      outstandingHostRequests.removeAll(pendingHostRequests);
    }

    Collection<String> pendingReservedHostNames = new ArrayList<>();
    for(String reservedHostName : requestsWithReservedHosts.keySet()) {
      HostRequest hostRequest = requestsWithReservedHosts.get(reservedHostName);
      if(hostGroupName == null || hostRequest.getHostgroupName().equals(hostGroupName)) {
        pendingHostRequests.add(hostRequest);
        pendingReservedHostNames.add(reservedHostName);
      }
    }
    requestsWithReservedHosts.keySet().removeAll(pendingReservedHostNames);

    allHostRequests.removeAll(pendingHostRequests);
    return pendingHostRequests;
  }

  public  LogicalRequest(Long id, TopologyRequest request, ClusterTopology topology);
  public  LogicalRequest(Long id, TopologyRequest request, ClusterTopology topology,
                        TopologyLogicalRequestEntity requestEntity);

}