(int failedIndex)
| 507 | } |
| 508 | |
| 509 | private void nextURL(int failedIndex) { |
| 510 | if (this.urls.size() == 1) { |
| 511 | return; // No point contending on the CAS if there's only one URL. |
| 512 | } |
| 513 | |
| 514 | // A request to the url at failedIndex just failed. Move to the next |
| 515 | // URL in the list. |
| 516 | int nextIndex = failedIndex + 1; |
| 517 | this.urlIndex.compareAndSet(failedIndex, nextIndex); |
| 518 | } |
| 519 | |
| 520 | private String buildCredentials() { |
| 521 | String user = ""; |