question: 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 ) ; }
target:  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