Package com.netflix.astyanax.connectionpool.exceptions

Examples of com.netflix.astyanax.connectionpool.exceptions.PoolTimeoutException


            if (timeout > 0) {
                connection = waitForConnection(isOpenning ? config.getConnectTimeout() : timeout);
                return connection;
            }
            else
                throw new PoolTimeoutException("Fast fail waiting for connection from pool")
                        .setHost(getHost())
                        .setLatency(System.currentTimeMillis() - startTime);
        }
        finally {
            if (connection != null) {
View Full Code Here


            blockedThreads.incrementAndGet();
            connection = availableConnections.poll(timeout, TimeUnit.MILLISECONDS);
            if (connection != null)
                return connection;
           
            throw new PoolTimeoutException("Timed out waiting for connection")
                .setHost(getHost())
                .setLatency(System.currentTimeMillis() - startTime);
        }
        catch (InterruptedException e) {
            Thread.currentThread().interrupt();
View Full Code Here

            if (activeConnectionCount.incrementAndGet() > config.getMaxConns()) {
                activeConnectionCount.decrementAndGet();
                try {
                    connection = idleConnections.poll(config.getMaxTimeoutWhenExhausted(), TimeUnit.MILLISECONDS);
                    if (connection == null) {
                        throw new PoolTimeoutException("Timed out waiting for connection from bag");
                    }
                    return connection;
                }
                catch (InterruptedException e) {
                    Thread.currentThread().interrupt();
View Full Code Here

TOP

Related Classes of com.netflix.astyanax.connectionpool.exceptions.PoolTimeoutException

Copyright © 2018 www.massapicom. 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.