com.netflix.astyanax.connectionpool.impl
Class LeastOutstandingExecuteWithFailover<CL,R>
java.lang.Object
com.netflix.astyanax.connectionpool.impl.AbstractExecuteWithFailoverImpl<CL,R>
com.netflix.astyanax.connectionpool.impl.LeastOutstandingExecuteWithFailover<CL,R>
- Type Parameters:
CL - R -
- All Implemented Interfaces:
- ExecuteWithFailover<CL,R>
public class LeastOutstandingExecuteWithFailover<CL,R>
- extends AbstractExecuteWithFailoverImpl<CL,R>
Finds the HostConnectionPool with the max idle connections when borrowing a connection from the pool.
This execute with failover impl is used within the TokenAwareConnectionPoolImpl class depending on the configured
HostSelectorStrategy
- See Also:
TokenAwareConnectionPoolImpl#executeWithFailover(Operation, com.netflix.astyanax.retry.RetryPolicy)} for details on where this class is referenced
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pool
protected HostConnectionPool<CL> pool
pools
protected final java.util.List<HostConnectionPool<CL>> pools
waitDelta
protected int waitDelta
waitMultiplier
protected int waitMultiplier
LeastOutstandingExecuteWithFailover
public LeastOutstandingExecuteWithFailover(ConnectionPoolConfiguration config,
ConnectionPoolMonitor monitor,
java.util.List<HostConnectionPool<CL>> pools)
throws ConnectionException
- Throws:
ConnectionException
canRetry
public boolean canRetry()
- Specified by:
canRetry in class AbstractExecuteWithFailoverImpl<CL,R>
- Returns:
- boolean
getCurrentHostConnectionPool
public HostConnectionPool<CL> getCurrentHostConnectionPool()
- Specified by:
getCurrentHostConnectionPool in class AbstractExecuteWithFailoverImpl<CL,R>
- Returns:
HostConnectionPool
borrowConnection
public Connection<CL> borrowConnection(Operation<CL,R> operation)
throws ConnectionException
- Specified by:
borrowConnection in class AbstractExecuteWithFailoverImpl<CL,R>
- Returns:
Connection
- Throws:
ConnectionException