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,
                      @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