org.apache.manifoldcf.crawler.jobs
Class HopCount.NodeQueue

java.lang.Object
  extended by org.apache.manifoldcf.crawler.jobs.HopCount.NodeQueue
Enclosing class:
HopCount

protected static class HopCount.NodeQueue
extends java.lang.Object

A queue object allows document nodes to be ordered appropriately for the most efficient execution. The queue handles DocumentNode objects exclusively. Mapping of Question to DocumentNode object involves structures outside of all queues.


Field Summary
protected  java.util.HashMap nodeMap
           
 
Constructor Summary
HopCount.NodeQueue()
          Constructor.
 
Method Summary
 void addToQueue(HopCount.DocumentNode node)
          Queue a document node.
 HopCount.DocumentNode nextNode()
          Fetch the next object off the queue for processing.
 HopCount.DocumentNode[] nextNodes()
          Fetch ALL of the nodes off the queue in one step.
 void removeFromQueue(HopCount.DocumentNode node)
          Remove a node from the queue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodeMap

protected java.util.HashMap nodeMap
Constructor Detail

HopCount.NodeQueue

public HopCount.NodeQueue()
Constructor.

Method Detail

addToQueue

public void addToQueue(HopCount.DocumentNode node)
Queue a document node.


removeFromQueue

public void removeFromQueue(HopCount.DocumentNode node)
Remove a node from the queue. This might happen if the node no longer needs evaluation.


nextNode

public HopCount.DocumentNode nextNode()
Fetch the next object off the queue for processing. Returns null if there are no more objects.


nextNodes

public HopCount.DocumentNode[] nextNodes()
Fetch ALL of the nodes off the queue in one step.