- All Known Implementing Classes:
- RestoreObjectMultipleResponseHandler
public interface MultipleResponseHandler
A "complex" request from Restore Orchestrator sometimes can result in sending several sub requests to
external service. The sub requests can run in parallel (asynchronously), but in the end, the responses
of all the sub requests need be combined to generate a single response to Orchestrator.
The interface defines a way to collect the subRequests' responses asynchronously when they are ready.
After receiving a response, in addReceivedResponse(), it should check if all responses are collected,
if so, build the combined response to Orchestrator.
the "complex" request examples:
1. a Kafka query partition status request can result in sending one request to each broker which
hosts a replica of the partition.
2. a RestoreObjectsInStoreRequest will result a batch of listObject requests to object store to get
a list of segment versions, then one copy request per object to restore them. when all responses
are returned, a single combined response will be return to orchestrator to report the restore status.