org.archive.wayback.resourceindex.cdx
Class CDXIndex
java.lang.Object
org.archive.wayback.util.flatfile.FlatFile
org.archive.wayback.resourceindex.cdx.CDXIndex
- All Implemented Interfaces:
- SearchResultSource
- Direct Known Subclasses:
- CDXFormatIndex
public class CDXIndex
- extends FlatFile
- implements SearchResultSource
- Version:
- $Date: 2010-09-29 05:28:38 +0700 (Wed, 29 Sep 2010) $, $Revision: 3262 $
- Author:
- brad
| Fields inherited from class org.archive.wayback.util.flatfile.FlatFile |
file |
| Methods inherited from class org.archive.wayback.util.flatfile.FlatFile |
findKeyOffset, findKeyOffsetLT, getLastMatchOffset, getPath, getRecordIterator, getRecordIteratorLT, getReverseRecordIterator, getSequentialIterator, main, setPath, store |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CDXIndex
public CDXIndex()
adaptIterator
protected CloseableIterator<CaptureSearchResult> adaptIterator(Iterator<String> itr)
throws IOException
- Throws:
IOException
getPrefixIterator
public CloseableIterator<CaptureSearchResult> getPrefixIterator(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(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
getUrlIterator
public Iterator<CaptureSearchResult> getUrlIterator(String prefix)
throws IOException
- Parameters:
prefix -
- Returns:
- Iterator of CaptureSearchResult of records starting with prefix
- Throws:
IOException
getClosestIterator
public Iterator<CaptureSearchResult> getClosestIterator(String prefix,
Date wantDate)
throws IOException
- Parameters:
prefix - wantTS -
- Returns:
- Iterator of results in closest order to wantTS
- Throws:
IOException
cleanup
public void cleanup(CloseableIterator<CaptureSearchResult> c)
throws IOException
- Specified by:
cleanup in interface SearchResultSource
- Throws:
IOException
shutdown
public void shutdown()
throws IOException
- Specified by:
shutdown in interface SearchResultSource
- Throws:
IOException
Copyright © 2005-2011 Internet Archive. All Rights Reserved.