* StatisticsTracker.java, HostsReport.java

rename getReverseSortedHostsDistribution() so it isn't misinterpreted as beans property
This commit is contained in:
gojomo committed 2009-09-26 04:09:20 +00:00
1 parent a285a65576
commit 71aa2ad51d
2 files changed
+10 -1

No files matched your search

@@ -38,7 +38,7 @@ public class HostsReport extends Report {
public void write(final PrintWriter writer) {
// TODO: use CrawlHosts for all stats; only perform sorting on
// manageable number of hosts
SortedMap<String,AtomicLong> hd = stats.getReverseSortedHostsDistribution();
SortedMap<String,AtomicLong> hd = stats.calcReverseSortedHostsDistribution();
// header
writer.print("[#urls] [#bytes] [host] [#robots] [#remaining]\n");
for (Iterator<String> i = hd.keySet().iterator(); i.hasNext();) {
@@ -904,8 +904,17 @@ public class StatisticsTracker
* Return a copy of the hosts distribution in reverse-sorted
* (largest first) order.
* @return SortedMap of hosts distribution
* @deprecated Use {@link #calcReverseSortedHostsDistribution()} instead
*/
public SortedMap<String,AtomicLong> getReverseSortedHostsDistribution() {
return calcReverseSortedHostsDistribution();
}
/**
* Return a copy of the hosts distribution in reverse-sorted
* (largest first) order.
* @return SortedMap of hosts distribution
*/
public SortedMap<String,AtomicLong> calcReverseSortedHostsDistribution() {
synchronized(hostsDistribution){
return getReverseSortedCopy(hostsDistribution);
}