Package com.netflix.astyanax.connectionpool

Examples of com.netflix.astyanax.connectionpool.HostConnectionPool


    @Override
    public Connection<CL> borrowConnection(Operation<CL, R> operation) throws ConnectionException {
        // find the pool with the least outstanding (i.e most idle) active connections
        Iterator<HostConnectionPool<CL>> iterator = this.pools.iterator();
        HostConnectionPool eligible = iterator.next();
        while (iterator.hasNext()) {
            HostConnectionPool<CL> candidate = iterator.next();
            if (candidate.getIdleConnectionCount() > eligible.getIdleConnectionCount()) {
                eligible = candidate;
            }
        }
        return eligible.borrowConnection(waitDelta * waitMultiplier);
    }
View Full Code Here

TOP

Related Classes of com.netflix.astyanax.connectionpool.HostConnectionPool

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.