Class UrlList
java.lang.Object
io.confluent.kafka.schemaregistry.client.rest.utils.UrlList
This class manages a set of urls for accessing an upstream registry. It basically
maintains a pointer to a known good url which can be accessed through
current().
When a request against the current url fails, the fail(String) method is invoked,
and we'll move on to the next url (returning back to the start if we have to).-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
UrlList
-
UrlList
-
-
Method Details
-
randomizeIndex
public void randomizeIndex() -
urls
-
current
Get the current url- Returns:
- the url
-
fail
Declare the given url as failed. This will cause the urls to rotate, so that the next request will be done against a new url (if one exists).- Parameters:
url- the url that has failed
-
size
public int size()The number of unique urls contained in this collection.- Returns:
- the count of urls
-
toString
-