- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for putIfAbsent (0.15 sec)
-
samples/crawler/src/main/java/okhttp3/sample/Crawler.java
} } } public void fetch(HttpUrl url) throws IOException { // Skip hosts that we've visited many times. AtomicInteger hostnameCount = new AtomicInteger(); AtomicInteger previous = hostnames.putIfAbsent(url.host(), hostnameCount); if (previous != null) hostnameCount = previous; if (hostnameCount.incrementAndGet() > 100) return; Request request = new Request.Builder() .url(url) .build();
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Aug 12 07:26:27 GMT 2021 - 4.6K bytes - Viewed (0)