dk.netarkivet.wayback.indexer
Class IndexerQueue

java.lang.Object
  extended by dk.netarkivet.wayback.indexer.IndexerQueue

public class IndexerQueue
extends java.lang.Object

Singleton class which maintains the basic data structure and methods for the indexer.


Method Summary
 void consume()
          Sequentially take objects from the queue and index them, blocking indefinitely while waiting for new objects to be added to the queue.
static IndexerQueue getInstance()
          Factory method for obtaining the unique instance of this class.
 void populate()
          Check the database for any new ArchiveFile objects and add them to the queue.
protected static void resestSingleton()
          Convenience method for use in unit tests.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static IndexerQueue getInstance()
Factory method for obtaining the unique instance of this class.

Returns:
the instance.

populate

public void populate()
Check the database for any new ArchiveFile objects and add them to the queue.


consume

public void consume()
Sequentially take objects from the queue and index them, blocking indefinitely while waiting for new objects to be added to the queue. It is intended that multiple threads should run this method simultaneously.


resestSingleton

protected static void resestSingleton()
Convenience method for use in unit tests.