private Object handleFailOver(QueryException qe,Method method,Object[] args,Protocol protocol) throws Throwable {
  HostAddress failHostAddress=null;
  boolean failIsMaster=true;
  if (protocol != null) {
    failHostAddress=protocol.getHostAddress();
    failIsMaster=protocol.isMasterConnection();
  }
  HandleErrorResult handleErrorResult=listener.handleFailover(qe,method,args,protocol);
  if (handleErrorResult.mustThrowError) {
    listener.throwFailoverMessage(failHostAddress,failIsMaster,qe,handleErrorResult.isReconnected);
  }
  return handleErrorResult.resultObject;
}

private Object handleFailOver ( QueryException qe , Method method , Object [ ] args , Protocol protocol ) throws Throwable { HostAddress failHostAddress = null ; boolean failIsMaster = true ; if ( protocol != null ) { failHostAddress = protocol . getHostAddress ( ) ; failIsMaster = protocol . isMasterConnection ( ) ; } HandleErrorResult handleErrorResult = listener . handleFailover ( qe , method , args , protocol ) ; if ( handleErrorResult . mustThrowError ) { listener . throwFailoverMessage ( failHostAddress , failIsMaster , qe , handleErrorResult . isReconnected ) ; } return handleErrorResult . resultObject ; }
after a connection exception , launch failover .
