Interface PartitionDispatchHandler<H,​P extends ResourcePath<K>,​K,​HTTP_REQUEST extends BasicRequest,​HTTP_RESPONSE,​HTTP_RESPONSE_STATUS>

    • Method Detail

      • dispatch

        void dispatch​(@Nonnull
                      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)
               throws RouterException
        Performs the work.
        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.