public class RestoreObjectMultipleResponseHandler extends Object implements MultipleResponseHandler
MultipleResponseHandler
for explain what
a complex request means).
The one RestoreObjectsInStoreRequest will result in:
1. multiple listObject subRequests, one subRequest per segment in the partition. Each request will have a
corresponding response, and every response will contain several files with their versions.
2. For each file in above response, An restoreObjectByCopy subRequest will be sent to object store to
restore it.
This handler implementation is to handle all the subRequests' responses asynchronously, and report back
a combined response to Orchestrator when all responses are received.Constructor and Description |
---|
RestoreObjectMultipleResponseHandler(RestoreObjectsInStoreRequest parentRequest,
AsyncServiceSchedulerResultsReceiver resultsReceiver) |
Modifier and Type | Method and Description |
---|---|
void |
addReceivedResponse(MessageResponse response)
Adds a response of subRequest to the list of received responses.
|
boolean |
receivedAllResponses() |
public RestoreObjectMultipleResponseHandler(RestoreObjectsInStoreRequest parentRequest, AsyncServiceSchedulerResultsReceiver resultsReceiver)
public void addReceivedResponse(MessageResponse response)
MultipleResponseHandler
addReceivedResponse
in interface MultipleResponseHandler
response
- response to addpublic boolean receivedAllResponses()
receivedAllResponses
in interface MultipleResponseHandler