Examples of keepAlive()


Examples of org.apache.http.impl.DefaultConnectionReuseStrategy.keepAlive()

                request.setEntity(fileEntity);
                context.setAttribute(ExecutionContext.HTTP_REQUEST, request);
                request.setParams(params);
                httpexecutor.preProcess(request, httpproc, context);
                HttpResponse response = httpexecutor.execute(request, conn, context);
                if (!connStrategy.keepAlive(response, context)) {
                    conn.close();
                }
            } catch (Exception e) {
                log.error(e.getMessage(), true);
            } finally {
View Full Code Here

Examples of org.apache.http.impl.DefaultConnectionReuseStrategy.keepAlive()

                request.setEntity(fileEntity);
                context.setAttribute(ExecutionContext.HTTP_REQUEST, request);
                request.setParams(params);
                httpexecutor.preProcess(request, httpproc, context);
                HttpResponse response = httpexecutor.execute(request, conn, context);
                if (!connStrategy.keepAlive(response, context)) {
                    conn.close();
                }
            } catch (Exception e) {
                log.error(e.getMessage(), true);
            } finally {
View Full Code Here

Examples of org.apache.http.impl.DefaultConnectionReuseStrategy.keepAlive()

                httpexecutor.postProcess(response, httpproc, context);
               
                System.out.println("<< Response: " + response.getStatusLine());
                System.out.println(EntityUtils.toString(response.getEntity()));
                System.out.println("==============");
                if (!connStrategy.keepAlive(response, context)) {
                    conn.close();
                } else {
                    System.out.println("Connection kept alive...");
                }
            }
View Full Code Here

Examples of org.apache.http.impl.DefaultConnectionReuseStrategy.keepAlive()

                httpexecutor.postProcess(response, httpproc, context);
               
                System.out.println("<< Response: " + response.getStatusLine());
                System.out.println(EntityUtils.toString(response.getEntity()));
                System.out.println("==============");
                if (!connStrategy.keepAlive(response, context)) {
                    conn.close();
                } else {
                    System.out.println("Connection kept alive...");
                }
            }
View Full Code Here

Examples of org.elasticsearch.search.internal.DefaultSearchContext.keepAlive()

            queryPhase.preProcess(context);
            fetchPhase.preProcess(context);

            // compute the context keep alive
            long keepAlive = defaultKeepAlive;
            context.keepAlive(keepAlive);
        } catch (Throwable e) {
            context.close();
            throw ExceptionsHelper.convertToRuntime(e);
        }
        return context;
View Full Code Here

Examples of org.elasticsearch.search.internal.SearchContext.keepAlive()

            // compute the context keep alive
            long keepAlive = defaultKeepAlive;
            if (request.scroll() != null && request.scroll().keepAlive() != null) {
                keepAlive = request.scroll().keepAlive().millis();
            }
            context.keepAlive(keepAlive);
        } catch (RuntimeException e) {
            context.release();
            throw e;
        }
View Full Code Here

Examples of org.infinispan.commons.executors.BlockingThreadPoolExecutorFactory.keepAlive()

      assertEquals(TestCacheManagerFactory.ASYNC_EXEC_QUEUE_SIZE, transportThreadPool.queueLength());

      BlockingThreadPoolExecutorFactory remoteCommandThreadPool =
            cm.getCacheManagerConfiguration().transport().remoteCommandThreadPool().threadPoolFactory();
      assertEquals(TestCacheManagerFactory.MAX_REQ_EXEC_THREADS, remoteCommandThreadPool.maxThreads());
      assertEquals(TestCacheManagerFactory.KEEP_ALIVE, remoteCommandThreadPool.keepAlive());

      BlockingThreadPoolExecutorFactory totalOrderThreadPool =
            cm.getCacheManagerConfiguration().transport().totalOrderThreadPool().threadPoolFactory();
      assertEquals(16, totalOrderThreadPool.maxThreads());
      assertEquals(1, totalOrderThreadPool.coreThreads());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.