public class InMemoryQueue extends AbstractIpAddressBasedQueue
| Modifier and Type | Field and Description |
|---|---|
private static int |
LIMITFORITERATOR |
protected SortedMap<IpUriTypePair,List<CrawleableUri>> |
queue |
| Constructor and Description |
|---|
InMemoryQueue() |
InMemoryQueue(Comparator<IpUriTypePair> comparator) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToQueue(CrawleableUri uri) |
void |
close()
Close RDB connection, destroy the database.
|
Iterator<AbstractMap.SimpleEntry<InetAddress,List<CrawleableUri>>> |
getIPURIIterator()
Goes through the queue und collects all IP-address with their URIs
|
protected Iterator<IpUriTypePair> |
getIterator() |
protected List<CrawleableUri> |
getUris(IpUriTypePair pair) |
boolean |
isEmpty()
Returns true is the queue is empty
|
void |
open()
Open RDB connection, init the database.
|
addUri, getNextUris, getNumberOfBlockedIps, markIpAddressAsAccessibleprotected SortedMap<IpUriTypePair,List<CrawleableUri>> queue
private static final int LIMITFORITERATOR
public InMemoryQueue()
public InMemoryQueue(Comparator<IpUriTypePair> comparator)
protected void addToQueue(CrawleableUri uri)
addToQueue in class AbstractIpAddressBasedQueueprotected Iterator<IpUriTypePair> getIterator()
getIterator in class AbstractIpAddressBasedQueueprotected List<CrawleableUri> getUris(IpUriTypePair pair)
getUris in class AbstractIpAddressBasedQueuepublic void open()
UriQueuepublic void close()
UriQueuepublic Iterator<AbstractMap.SimpleEntry<InetAddress,List<CrawleableUri>>> getIPURIIterator()
IpAddressBasedQueuepublic boolean isEmpty()
UriQueueCopyright © 2017–2019. All rights reserved.