Examples of closeIdleConnections()


Examples of org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager.closeIdleConnections()

                     mgr.getConnectionsInPool(), 1);
        assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 1);

        // this implicitly deletes them
        mgr.closeIdleConnections(0L, TimeUnit.MILLISECONDS);

        assertEquals("connectionsInPool",
                     mgr.getConnectionsInPool(), 0);
        assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 0);
View Full Code Here

Examples of org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager.closeIdleConnections()

           
            if (e instanceof ConnectionPoolTimeoutException) {
                // Should never happen, so let's dump some info about the connection pool.
                ThreadSafeClientConnManager cm = (ThreadSafeClientConnManager)_httpClient.getConnectionManager();
                int numConnections = cm.getConnectionsInPool();
                cm.closeIdleConnections(0, TimeUnit.MILLISECONDS);
                LOGGER.error(String.format("Got ConnectionPoolTimeoutException: %d connections before, %d after idle close", numConnections, cm.getConnectionsInPool()));
            }
           
            throw new IOFetchException(url, e);
        } catch (URISyntaxException e) {
View Full Code Here

Examples of org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager.closeIdleConnections()

                     mgr.getConnectionsInPool(), 1);
        assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 1);

        // this implicitly deletes them
        mgr.closeIdleConnections(0L, TimeUnit.MILLISECONDS);

        assertEquals("connectionsInPool",
                     mgr.getConnectionsInPool(), 0);
        assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 0);
View Full Code Here

Examples of org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager.closeIdleConnections()

                     mgr.getConnectionsInPool(), 1);
        Assert.assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 1);

        // this implicitly deletes them
        mgr.closeIdleConnections(0L, TimeUnit.MILLISECONDS);

        Assert.assertEquals("connectionsInPool",
                     mgr.getConnectionsInPool(), 0);
        Assert.assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 0);
View Full Code Here

Examples of org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager.closeIdleConnections()

                     mgr.getConnectionsInPool(), 1);
        assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 1);

        // this implicitly deletes them
        mgr.closeIdleConnections(0L, TimeUnit.MILLISECONDS);

        assertEquals("connectionsInPool",
                     mgr.getConnectionsInPool(), 0);
        assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 0);
View Full Code Here

Examples of org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager.closeIdleConnections()

                     mgr.getConnectionsInPool(), 1);
        assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 1);

        // this implicitly deletes them
        mgr.closeIdleConnections(0L, TimeUnit.MILLISECONDS);

        assertEquals("connectionsInPool",
                     mgr.getConnectionsInPool(), 0);
        assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 0);
View Full Code Here

Examples of org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager.closeIdleConnections()

        assertEquals("connectionsInPool",
                     mgr.getConnectionsInPool(), 1);
        assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 1);

        mgr.closeIdleConnections(0L); // implicitly deletes them, too

        assertEquals("connectionsInPool",
                     mgr.getConnectionsInPool(), 0);
        assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 0);
View Full Code Here

Examples of org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager.closeIdleConnections()

                     mgr.getConnectionsInPool(), 1);
        assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 1);

        // this implicitly deletes them
        mgr.closeIdleConnections(0L, TimeUnit.MILLISECONDS);

        assertEquals("connectionsInPool",
                     mgr.getConnectionsInPool(), 0);
        assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 0);
View Full Code Here

Examples of org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager.closeIdleConnections()

                     mgr.getConnectionsInPool(), 1);
        Assert.assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 1);

        // this implicitly deletes them
        mgr.closeIdleConnections(0L, TimeUnit.MILLISECONDS);

        Assert.assertEquals("connectionsInPool",
                     mgr.getConnectionsInPool(), 0);
        Assert.assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 0);
View Full Code Here

Examples of org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager.closeIdleConnections()

                     mgr.getConnectionsInPool(), 1);
        assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 1);

        // this implicitly deletes them
        mgr.closeIdleConnections(0L, TimeUnit.MILLISECONDS);

        assertEquals("connectionsInPool",
                     mgr.getConnectionsInPool(), 0);
        assertEquals("connectionsInPool(host)",
                     mgr.getConnectionsInPool(route), 0);
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.