public class FailoverUrlSelector extends AbstractUrlSelector
conf, urls| Constructor and Description |
|---|
FailoverUrlSelector(String clusterUrl) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
failedError(Exception ex)
Returns true if the given Exception indicates the respective URL can be treated as failed.
|
String |
select()
Returns the current url chosen among the given cluster urls.
|
void |
urlWithError(String url,
Exception e)
Sets the given
url is failed with the given Exception ex. |
initpublic FailoverUrlSelector(String clusterUrl)
public String select()
UrlSelectorpublic void urlWithError(String url, Exception e)
UrlSelectorurl is failed with the given Exception ex.url - failed urle - exception encounteredprotected boolean failedError(Exception ex)
ex - Copyright © 2020. All rights reserved.