edu.unika.aifb.rdf.crawler
Class ChannelPool

java.lang.Object
  |
  +--edu.unika.aifb.rdf.crawler.ChannelPool

public class ChannelPool
extends java.lang.Object

This class gets URIs one by one and decides when to start new threads. It maintains a static reference to URIList and SetModel, so that the threads (also known as Channels) can update the status of this list and the accumulating RDF model


Field Summary
static java.util.Vector bigvect
           
 Cache cache
           
static int capacity
           
static java.lang.StringBuffer finishedthreads
           
static URIList urilist
           
 
Constructor Summary
ChannelPool(URIList urilist, Cache cache, int capacity, int deadline)
          This constructor initializes ChannelPool - normally there is just one instance of it per program.
 
Method Summary
static boolean getEndSignal()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

capacity

public static int capacity

finishedthreads

public static java.lang.StringBuffer finishedthreads

urilist

public static URIList urilist

bigvect

public static java.util.Vector bigvect

cache

public Cache cache
Constructor Detail

ChannelPool

public ChannelPool(URIList urilist,
                   Cache cache,
                   int capacity,
                   int deadline)

This constructor initializes ChannelPool - normally there is just one instance of it per program. It stores a static reference to the URIList, the list may be updated by requests from ChannelPool or individual channels therein.

Also static reference of the cache.

We pass also capacity constraint - no more channels than "capacity" should be created for optimum performance. "deadline" - for how many seconds we are performing operations in the network (networking is assumed to be the bottleneck). After deadline no more new threads are created, but the existing ones may be allowed to finish their document processing.

Method Detail

getEndSignal

public static boolean getEndSignal()