Examples of ConnectionPoolTimeoutException


Examples of org.apache.http.conn.ConnectionPoolTimeoutException

            if (this.log.isDebugEnabled()) {
                this.log.debug("Connection leased: " + format(entry) + formatStats(entry.getRoute()));
            }
            return CPoolProxy.newProxy(entry);
        } catch (final TimeoutException ex) {
            throw new ConnectionPoolTimeoutException("Timeout waiting for connection from pool");
        }
    }
View Full Code Here

Examples of org.apache.http.conn.ConnectionPoolTimeoutException

                            final TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException {
                        connLatch.countDown(); // notify waiter that we're getting a connection

                        // zero usually means sleep forever, but CountDownLatch doesn't interpret it that way.
                        if(!awaitLatch.await(timeout > 0 ? timeout : Integer.MAX_VALUE, tunit)) {
                            throw new ConnectionPoolTimeoutException();
                        }

                        return Mockito.mock(HttpClientConnection.class);
                    }
                };
View Full Code Here

Examples of org.apache.http.conn.ConnectionPoolTimeoutException

                        final TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException {
                    connLatch.countDown(); // notify waiter that we're getting a connection

                    // zero usually means sleep forever, but CountDownLatch doesn't interpret it that way.
                    if(!awaitLatch.await(timeout > 0 ? timeout : Integer.MAX_VALUE, tunit)) {
                        throw new ConnectionPoolTimeoutException();
                    }

                    return Mockito.mock(HttpClientConnection.class);
                }
View Full Code Here

Examples of org.apache.http.conn.ConnectionPoolTimeoutException

                    }

                    // check for spurious wakeup vs. timeout
                    if (!success && (deadline != null) &&
                        (deadline.getTime() <= System.currentTimeMillis())) {
                        throw new ConnectionPoolTimeoutException
                            ("Timeout waiting for connection from pool");
                    }
                }
            } // while no entry
View Full Code Here

Examples of org.apache.http.conn.ConnectionPoolTimeoutException

            if (this.log.isDebugEnabled()) {
                this.log.debug("Connection leased: " + format(entry) + formatStats(entry.getRoute()));
            }
            return CPoolProxy.newProxy(entry);
        } catch (final TimeoutException ex) {
            throw new ConnectionPoolTimeoutException("Timeout waiting for connection from pool");
        }
    }
View Full Code Here

Examples of org.apache.http.conn.ConnectionPoolTimeoutException

                            final TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException {
                        connLatch.countDown(); // notify waiter that we're getting a connection

                        // zero usually means sleep forever, but CountDownLatch doesn't interpret it that way.
                        if(!awaitLatch.await(timeout > 0 ? timeout : Integer.MAX_VALUE, tunit)) {
                            throw new ConnectionPoolTimeoutException();
                        }

                        return Mockito.mock(HttpClientConnection.class);
                    }
                };
View Full Code Here

Examples of org.apache.http.conn.ConnectionPoolTimeoutException

                        final TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutException {
                    connLatch.countDown(); // notify waiter that we're getting a connection

                    // zero usually means sleep forever, but CountDownLatch doesn't interpret it that way.
                    if(!awaitLatch.await(timeout > 0 ? timeout : Integer.MAX_VALUE, tunit)) {
                        throw new ConnectionPoolTimeoutException();
                    }

                    return Mockito.mock(HttpClientConnection.class);
                }
View Full Code Here

Examples of org.apache.http.conn.ConnectionPoolTimeoutException

            }
            this.log.error("Unexpected exception leasing connection from pool", cause);
            // Should never happen
            throw new InterruptedException();
        } catch (final TimeoutException ex) {
            throw new ConnectionPoolTimeoutException("Timeout waiting for connection from pool");
        }
    }
View Full Code Here

Examples of org.apache.http.conn.ConnectionPoolTimeoutException

        assertTrue(impl.shouldBackoff(new ConnectException()));
    }

    @Test
    public void doesNotBackOffForConnectionManagerTimeout() {
        assertFalse(impl.shouldBackoff(new ConnectionPoolTimeoutException()));
    }
View Full Code Here

Examples of org.apache.http.conn.ConnectionPoolTimeoutException

            }
            this.log.error("Unexpected exception leasing connection from pool", cause);
            // Should never happen
            throw new InterruptedException();
        } catch (TimeoutException ex) {
            throw new ConnectionPoolTimeoutException("Timeout waiting for connection");
        }
    }
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.