org.archive.wayback.resourceindex.bdb
Class BDBIndex
java.lang.Object
org.archive.wayback.util.bdb.BDBRecordSet
org.archive.wayback.resourceindex.bdb.BDBIndex
- All Implemented Interfaces:
- SearchResultSource, UpdatableSearchResultSource
public class BDBIndex
- extends BDBRecordSet
- implements UpdatableSearchResultSource
- Version:
- $Date: 2008-07-10 11:41:53 -0700 (Thu, 10 Jul 2008) $, $Revision: 2425 $
- Author:
- brad
| Methods inherited from class org.archive.wayback.util.bdb.BDBRecordSet |
bytesToString, delete, get, getDbName, getPath, initializeDB, insertRecords, put, recordIterator, recordIterator, setDbName, setPath, shutdownDB, stringToBytes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BDBIndex
public BDBIndex()
init
public void init()
throws com.sleepycat.je.DatabaseException,
ConfigurationException
- Throws:
com.sleepycat.je.DatabaseException
ConfigurationException
getPrefixIterator
public CloseableIterator<CaptureSearchResult> getPrefixIterator(java.lang.String prefix)
throws ResourceIndexNotAvailableException
- Specified by:
getPrefixIterator in interface SearchResultSource
- Returns:
- CleanableIterator that will return SearchResults beginning with prefix
argument, with subsequent next() calls returning subsequent
results.
- Throws:
ResourceIndexNotAvailableException
getPrefixReverseIterator
public CloseableIterator<CaptureSearchResult> getPrefixReverseIterator(java.lang.String prefix)
throws ResourceIndexNotAvailableException
- Specified by:
getPrefixReverseIterator in interface SearchResultSource
- Returns:
- CleanableIterator that will return SearchResults starting *before* prefix
argument, with subsequent next() calls returning previous
results.
- Throws:
ResourceIndexNotAvailableException
cleanup
public void cleanup(CloseableIterator<CaptureSearchResult> c)
throws java.io.IOException
- Specified by:
cleanup in interface SearchResultSource
- Throws:
java.io.IOException
addSearchResults
public void addSearchResults(java.util.Iterator<CaptureSearchResult> itr,
UrlCanonicalizer canonicalizer)
throws java.io.IOException
- Specified by:
addSearchResults in interface UpdatableSearchResultSource
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] args)
- Parameters:
args -
getBdbPath
public java.lang.String getBdbPath()
- Returns:
- the bdbPath
setBdbPath
public void setBdbPath(java.lang.String bdbPath)
- Parameters:
bdbPath - the bdbPath to set
getBdbName
public java.lang.String getBdbName()
- Returns:
- the bdbName
setBdbName
public void setBdbName(java.lang.String bdbName)
- Parameters:
bdbName - the bdbName to set
shutdown
public void shutdown()
throws java.io.IOException
- Specified by:
shutdown in interface SearchResultSource
- Throws:
java.io.IOException
Copyright © 2005-2009 Internet Archive. All Rights Reserved.