throw new IllegalStateException("The request payload with serialId " + serialId + " was already registered");
}
}
public RequestPayload retrieveRequestPayload(long serialId) {
RequestPayload payload = requestPayloads.remove(serialId);
if (payload == null) {
throw new IllegalStateException("The request payload with serialId" + serialId + " was never registered");
}
return payload;
}