org.apache.hadoop.chukwa.datacollection.sender
Class RetryListOfCollectors
java.lang.Object
org.apache.hadoop.chukwa.datacollection.sender.RetryListOfCollectors
- All Implemented Interfaces:
- Iterator<String>
public class RetryListOfCollectors
- extends Object
- implements Iterator<String>
An iterator returning a list of Collectors to try. This class is
nondeterministic, since it puts collectors back on the list after some
period.
No node will be polled more than once per maxRetryRateMs milliseconds.
hasNext() will continue return true if you have not called it recently.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RetryListOfCollectors
public RetryListOfCollectors(File collectorFile,
int maxRetryRateMs)
throws IOException
- Throws:
IOException
RetryListOfCollectors
public RetryListOfCollectors(List<String> collectors,
int maxRetryRateMs)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<String>
next
public String next()
- Specified by:
next
in interface Iterator<String>
getRandomCollector
public String getRandomCollector()
add
public void add(URL collector)
remove
public void remove()
- Specified by:
remove
in interface Iterator<String>
Copyright © ${year} The Apache Software Foundation