// javadoc inherited
public void waitForComplete(final Set requestIds) throws MediaAgentException {
synchronized (lock) {
for (Iterator iter = requestIds.iterator(); iter.hasNext(); ) {
final AgentRequestId requestId = (AgentRequestId) iter.next();
final AgentRequest agentRequest =
(AgentRequest) requestMap.get(requestId);
if (agentRequest.getState().equals(AgentRequestState.PENDING)) {
waitForComplete(requestId);
}