public class LoadBalancedFailoverUrlSelector extends AbstractUrlSelector
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FAILED_URL_EXPIRY_INTERVAL_MS
Property to configure time interval at which failed URL may be considered active.
|
conf, urls| Constructor and Description |
|---|
LoadBalancedFailoverUrlSelector(java.lang.String clusterUrl) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
failedError(java.lang.Exception ex)
Returns true if the given Exception indicates the respective URL can be treated as failed.
|
void |
init(java.util.Map<java.lang.String,java.lang.Object> conf) |
java.lang.String |
select()
Returns the current url chosen among the given cluster urls.
|
void |
urlWithError(java.lang.String url,
java.lang.Exception e)
Sets the given
url is failed with the given Exception ex. |
public static final java.lang.String FAILED_URL_EXPIRY_INTERVAL_MS
public LoadBalancedFailoverUrlSelector(java.lang.String clusterUrl)
public void init(java.util.Map<java.lang.String,java.lang.Object> conf)
init in interface UrlSelectorinit in class AbstractUrlSelectorpublic java.lang.String select()
UrlSelectorpublic void urlWithError(java.lang.String url,
java.lang.Exception e)
UrlSelectorurl is failed with the given Exception ex.url - failed urle - exception encounteredprotected boolean failedError(java.lang.Exception ex)
ex -