Package com.linkedin.alpini.router.api
Interface PartitionDispatchHandler<H,P extends ResourcePath<K>,K,HTTP_REQUEST extends BasicRequest,HTTP_RESPONSE,HTTP_RESPONSE_STATUS>
-
- All Known Subinterfaces:
PartitionDispatchHandler4<H,P,K>
- All Known Implementing Classes:
VeniceDispatcher
public interface PartitionDispatchHandler<H,P extends ResourcePath<K>,K,HTTP_REQUEST extends BasicRequest,HTTP_RESPONSE,HTTP_RESPONSE_STATUS>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
dispatch(Scatter<H,P,K> scatter, ScatterGatherRequest<H,K> part, P path, HTTP_REQUEST request, AsyncPromise<H> hostSelected, AsyncPromise<java.util.List<HTTP_RESPONSE>> responseFuture, AsyncPromise<HTTP_RESPONSE_STATUS> retryFuture, AsyncFuture<java.lang.Void> timeoutFuture, java.util.concurrent.Executor contextExecutor)
Performs the work.
-
-
-
Method Detail
-
dispatch
void dispatch(@Nonnull Scatter<H,P,K> scatter, @Nonnull ScatterGatherRequest<H,K> part, @Nonnull P path, @Nonnull HTTP_REQUEST request, @Nonnull AsyncPromise<H> hostSelected, @Nonnull AsyncPromise<java.util.List<HTTP_RESPONSE>> responseFuture, @Nonnull AsyncPromise<HTTP_RESPONSE_STATUS> retryFuture, @Nonnull AsyncFuture<java.lang.Void> timeoutFuture, @Nonnull java.util.concurrent.Executor contextExecutor) throws RouterException
Performs the work.- Parameters:
scatter
- The scatter-gather request.part
- The part of the scatter-gather request to be executed.path
- The derived path of this part of the request.request
- The original HttpRequest object.hostSelected
- To be completed with the actual host selected.responseFuture
- To be completed with HttpResponse parts.retryFuture
- To be completed with the HttpResponseStatus.timeoutFuture
- Listen for timeout.contextExecutor
- For executing work on context executor. A single thread is available for each request. For efficiency, the AsyncPromises should be completed on the context executor thread.- Throws:
RouterException
-
-