org.archive.wayback.resourceindex.updater
Class LocalResourceIndexUpdater
java.lang.Object
org.archive.wayback.resourceindex.updater.LocalResourceIndexUpdater
- All Implemented Interfaces:
- Shutdownable
public class LocalResourceIndexUpdater
- extends Object
- implements Shutdownable
Class which starts a background thread that repeatedly scans an incoming
directory and merges files found therein(which are assumed to be in CDX
format) with a BDBIndex. Optional configurations include:
target directory where merged files are moved to (otherwise deleted)
target directory where failed failed are moved(otherwise left in place)
milliseconds between scans of the incoming directory(default 10000)
- Version:
- $Date: 2010-09-29 05:28:38 +0700 (Wed, 29 Sep 2010) $, $Revision: 3262 $
- Author:
- brad
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalResourceIndexUpdater
public LocalResourceIndexUpdater()
init
public void init()
throws ConfigurationException
- start the background index merging thread
- Throws:
ConfigurationException
shutdown
public void shutdown()
- Description copied from interface:
Shutdownable
- Release any resources used by this ResourceIndex cleanly
- Specified by:
shutdown in interface Shutdownable
mergeAll
protected int mergeAll()
getIndex
public LocalResourceIndex getIndex()
- Returns:
- the index
setIndex
public void setIndex(LocalResourceIndex index)
- Parameters:
index - the index to set
getIncoming
public String getIncoming()
- Returns:
- the incoming directory path, or null if not set
setIncoming
public void setIncoming(String incoming)
throws IOException
- Parameters:
incoming - the incoming to set
- Throws:
IOException
getMerged
public String getMerged()
- Returns:
- the merged directory path, or null if not set
setMerged
public void setMerged(String merged)
throws IOException
- Parameters:
merged -
- Throws:
IOException
getFailed
public String getFailed()
- Returns:
- the failed directory path, or null if not set
setFailed
public void setFailed(String failed)
throws IOException
- Parameters:
failed - The failed to set.
- Throws:
IOException
getRunInterval
public int getRunInterval()
- Returns:
- the runInterval
setRunInterval
public void setRunInterval(int runInterval)
- Parameters:
runInterval - The runInterval to set.
Copyright © 2005-2011 Internet Archive. All Rights Reserved.