comirva.web.crawling.agmis
Class DownloadControlDataVector

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector<DownloadControlData>
              extended by comirva.web.crawling.agmis.DownloadControlDataVector
All Implemented Interfaces:
Serializable, Cloneable, Iterable<DownloadControlData>, Collection<DownloadControlData>, List<DownloadControlData>, RandomAccess

 class DownloadControlDataVector
extends Vector<DownloadControlData>

Extension to Vector to cope with special requirements of the DownloadControlData.


Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
DownloadControlDataVector()
           
 
Method Summary
 int getNumberOfBlockingHosts()
          Calculates and returns the number of hosts that are not ready to be queried due to timing reasons (too few time passed since last access).
 long getTimeElapsed(String host)
          Returns the time elapsed since the given host was queried the last time.
 void update(DownloadControlData dcd)
          Updates the timestamp of a host.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

DownloadControlDataVector

public DownloadControlDataVector()
Method Detail

update

public void update(DownloadControlData dcd)
Updates the timestamp of a host. Or inserts the host in the vector if it is not already contained.

Parameters:
dcd -

getTimeElapsed

public long getTimeElapsed(String host)
Returns the time elapsed since the given host was queried the last time.

Parameters:
host - the host of interest
Returns:

getNumberOfBlockingHosts

public int getNumberOfBlockingHosts()
Calculates and returns the number of hosts that are not ready to be queried due to timing reasons (too few time passed since last access).

Returns:
the number of hosts