com.netflix.astyanax.connectionpool.impl
Class RoundRobinExecuteWithFailover<CL,R>

java.lang.Object
  extended by com.netflix.astyanax.connectionpool.impl.AbstractExecuteWithFailoverImpl<CL,R>
      extended by com.netflix.astyanax.connectionpool.impl.RoundRobinExecuteWithFailover<CL,R>
All Implemented Interfaces:
ExecuteWithFailover<CL,R>

public class RoundRobinExecuteWithFailover<CL,R>
extends AbstractExecuteWithFailoverImpl<CL,R>


Field Summary
protected  HostConnectionPool<CL> pool
           
protected  List<HostConnectionPool<CL>> pools
           
protected  int size
           
protected  int waitDelta
           
protected  int waitMultiplier
           
 
Fields inherited from class com.netflix.astyanax.connectionpool.impl.AbstractExecuteWithFailoverImpl
config, connection
 
Constructor Summary
RoundRobinExecuteWithFailover(ConnectionPoolConfiguration config, ConnectionPoolMonitor monitor, List<HostConnectionPool<CL>> pools, int index)
           
 
Method Summary
 Connection<CL> borrowConnection(Operation<CL,R> operation)
           
 boolean canRetry()
           
 HostConnectionPool<CL> getCurrentHostConnectionPool()
           
 int getNextHostIndex()
           
 
Methods inherited from class com.netflix.astyanax.connectionpool.impl.AbstractExecuteWithFailoverImpl
getCurrentHost, informException, releaseConnection, tryOperation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pool

protected HostConnectionPool<CL> pool

pools

protected final List<HostConnectionPool<CL>> pools

size

protected int size

waitDelta

protected int waitDelta

waitMultiplier

protected int waitMultiplier
Constructor Detail

RoundRobinExecuteWithFailover

public RoundRobinExecuteWithFailover(ConnectionPoolConfiguration config,
                                     ConnectionPoolMonitor monitor,
                                     List<HostConnectionPool<CL>> pools,
                                     int index)
                              throws ConnectionException
Throws:
ConnectionException
Method Detail

getNextHostIndex

public int getNextHostIndex()

canRetry

public boolean canRetry()
Specified by:
canRetry in class AbstractExecuteWithFailoverImpl<CL,R>

getCurrentHostConnectionPool

public HostConnectionPool<CL> getCurrentHostConnectionPool()
Specified by:
getCurrentHostConnectionPool in class AbstractExecuteWithFailoverImpl<CL,R>

borrowConnection

public Connection<CL> borrowConnection(Operation<CL,R> operation)
                                throws ConnectionException
Specified by:
borrowConnection in class AbstractExecuteWithFailoverImpl<CL,R>
Throws:
ConnectionException


Copyright © 2012. All Rights Reserved.