result.setAttemptsCount(attemptCounter);
monitor.incOperationSuccess(getCurrentHost(), result.getLatency());
return result;
}
catch (Exception e) {
ConnectionException ce = (e instanceof ConnectionException) ? (ConnectionException) e
: new UnknownException(e);
try {
informException(ce);
monitor.incFailover(ce.getHost(), ce);
}
catch (ConnectionException ex) {
monitor.incOperationFailure(getCurrentHost(), ex);
throw ex;
}