Package dk.netarkivet.wayback.indexer
Class IndexerQueue
- java.lang.Object
-
- dk.netarkivet.wayback.indexer.IndexerQueue
-
public class IndexerQueue extends Object
Singleton class which maintains the basic data structure and methods for the indexer.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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.
-
-