org.archive.wayback.resourcestore.indexer
Class IndexQueueUpdater

java.lang.Object
  extended by org.archive.wayback.resourcestore.indexer.IndexQueueUpdater
All Implemented Interfaces:
Shutdownable

public class IndexQueueUpdater
extends Object
implements Shutdownable

This class polls a ResourceFileLocationDB repeatedly, to notice new files arriving in the DB. Whenever new files are noticed, they are added to the Index Queue. It uses a local file to store the last known "mark" of the location DB.

Version:
$Date: 2010-09-29 05:28:38 +0700 (Wed, 29 Sep 2010) $, $Revision: 3262 $
Author:
brad

Constructor Summary
IndexQueueUpdater()
           
 
Method Summary
 ResourceFileLocationDB getDb()
           
 long getInterval()
           
 String getLastMark()
           
 IndexQueue getQueue()
           
 void init()
           
 void setDb(ResourceFileLocationDB db)
           
 void setInterval(long interval)
           
 void setLastMark(String path)
           
 void setQueue(IndexQueue queue)
           
 void shutdown()
          Release any resources used by this ResourceIndex cleanly
 int updateQueue()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexQueueUpdater

public IndexQueueUpdater()
Method Detail

init

public void init()

shutdown

public void shutdown()
Description copied from interface: Shutdownable
Release any resources used by this ResourceIndex cleanly

Specified by:
shutdown in interface Shutdownable

updateQueue

public int updateQueue()
                throws IOException
Throws:
IOException

getDb

public ResourceFileLocationDB getDb()
Returns:
the db

setDb

public void setDb(ResourceFileLocationDB db)
Parameters:
db - the db to set

getQueue

public IndexQueue getQueue()
Returns:
the queue

setQueue

public void setQueue(IndexQueue queue)
Parameters:
queue - the queue to set

getLastMark

public String getLastMark()
Returns:
the stateFile

setLastMark

public void setLastMark(String path)
                 throws IOException
Parameters:
stateFile - the stateFile to set
Throws:
IOException

getInterval

public long getInterval()
Returns:
the interval

setInterval

public void setInterval(long interval)
Parameters:
interval - the interval to set


Copyright © 2005-2011 Internet Archive. All Rights Reserved.