private void updatePlacements(ResourcePoolService.ResourcePoolState resourcePoolState){
  QueryTask queryTask=QueryUtil.buildPropertyQuery(GroupResourcePlacementService.GroupResourcePlacementState.class,GroupResourcePlacementService.GroupResourcePlacementState.FIELD_NAME_RESOURCE_POOL_LINK,resourcePoolState.documentSelfLink);
  QueryUtil.addExpandOption(queryTask);
  ServiceDocumentQuery<GroupResourcePlacementState> query=new ServiceDocumentQuery<>(getHost(),GroupResourcePlacementState.class);
  List<GroupResourcePlacementState> placements=new ArrayList<>();
  query.query(queryTask,null);
}

private void updatePlacements ( ResourcePoolService . ResourcePoolState resourcePoolState ) { QueryTask queryTask = QueryUtil . buildPropertyQuery ( GroupResourcePlacementService . GroupResourcePlacementState . class , GroupResourcePlacementService . GroupResourcePlacementState . FIELD_NAME_RESOURCE_POOL_LINK , resourcePoolState . documentSelfLink ) ; QueryUtil . addExpandOption ( queryTask ) ; ServiceDocumentQuery < GroupResourcePlacementState > query = new ServiceDocumentQuery < > ( getHost ( ) , GroupResourcePlacementState . class ) ; List < GroupResourcePlacementState > placements = new ArrayList < > ( ) ; query . query ( queryTask , null ) ; }
update the placements if we have more resources reserved than what ' s actually in the resource pool . sort the placements by priority and decrease from their reservations
