Examples of ConnectionPoolTimeoutException


Examples of org.apache.http.conn.ConnectionPoolTimeoutException

                // TODO: keep track of which routes have waiting threads,
                // so they avoid being sacrificed before necessary

                try {
                    if (useTimeout && timeToWait <= 0) {
                        throw new ConnectionPoolTimeoutException
                            ("Timeout waiting for connection");
                    }
  
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Need to wait for connection. " + route);
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");
                    }
                }
            } // while no entry
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");
                    }
                }
            } // while no entry
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 from pool");
        }
    }
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

                        // zero usually means sleep forever, but CountDownLatch doesn't interpret it that way.
                        if(timeout == 0)
                            timeout = Integer.MAX_VALUE;

                        if(!awaitLatch.await(timeout, tunit))
                            throw new ConnectionPoolTimeoutException();

                        return Mockito.mock(ManagedClientConnection.class);
                    }
                };
            } else {
View Full Code Here

Examples of org.apache.http.conn.ConnectionPoolTimeoutException

                    // zero usually means sleep forever, but CountDownLatch doesn't interpret it that way.
                    if(timeout == 0)
                        timeout = Integer.MAX_VALUE;

                    if(!awaitLatch.await(timeout, tunit))
                        throw new ConnectionPoolTimeoutException();

                    return Mockito.mock(ManagedClientConnection.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

            }
            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
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.