Class FutureRequestExecutionService

    • Constructor Detail

      • FutureRequestExecutionService

        public FutureRequestExecutionService​(HttpClient httpclient,
                                             ExecutorService executorService)
        Create a new FutureRequestExecutionService.
        Parameters:
        httpclient - you should tune your httpclient instance to match your needs. You should align the max number of connections in the pool and the number of threads in the executor; it doesn't make sense to have more threads than connections and if you have less connections than threads, the threads will just end up blocking on getting a connection from the pool.
        executorService - any executorService will do here. E.g. Executors.newFixedThreadPool(int)