Class SchedulingURLBuffer
- java.lang.Object
-
- com.digitalpebble.stormcrawler.persistence.urlbuffer.AbstractURLBuffer
-
- com.digitalpebble.stormcrawler.persistence.urlbuffer.SchedulingURLBuffer
-
- All Implemented Interfaces:
URLBuffer
,com.github.benmanes.caffeine.cache.RemovalListener<String,Object[]>
public class SchedulingURLBuffer extends AbstractURLBuffer implements com.github.benmanes.caffeine.cache.RemovalListener<String,Object[]>
Checks how long the last N URLs took to work out whether a queue should release a URL.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.digitalpebble.stormcrawler.persistence.urlbuffer.AbstractURLBuffer
AbstractURLBuffer.URLMetadata
-
-
Field Summary
Fields Modifier and Type Field Description static String
MAXTIMEPARAM
-
Fields inherited from class com.digitalpebble.stormcrawler.persistence.urlbuffer.AbstractURLBuffer
in_buffer, listener, partitioner, queues
-
Fields inherited from interface com.digitalpebble.stormcrawler.persistence.urlbuffer.URLBuffer
bufferClassParamName
-
-
Constructor Summary
Constructors Constructor Description SchedulingURLBuffer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acked(String url)
Notify the buffer that a URL has been successfully processed used e.g to compute an ideal delay for a host queuevoid
configure(Map<String,Object> stormConf)
org.apache.storm.tuple.Values
next()
Retrieves the next available URL, guarantees that the URLs are always perfectly shuffledvoid
onRemoval(@Nullable String key, Object @Nullable [] value, @NotNull com.github.benmanes.caffeine.cache.RemovalCause cause)
-
Methods inherited from class com.digitalpebble.stormcrawler.persistence.urlbuffer.AbstractURLBuffer
add, add, hasNext, numQueues, setEmptyQueueListener, size
-
-
-
-
Field Detail
-
MAXTIMEPARAM
public static final String MAXTIMEPARAM
- See Also:
- Constant Field Values
-
-
Method Detail
-
configure
public void configure(Map<String,Object> stormConf)
- Specified by:
configure
in interfaceURLBuffer
- Overrides:
configure
in classAbstractURLBuffer
-
next
public org.apache.storm.tuple.Values next()
Retrieves the next available URL, guarantees that the URLs are always perfectly shuffled
-
acked
public void acked(String url)
Description copied from interface:URLBuffer
Notify the buffer that a URL has been successfully processed used e.g to compute an ideal delay for a host queue
-
-