org.apache.maven.index
Class IteratorSearchResponse
java.lang.Object
org.apache.maven.index.AbstractSearchResponse
org.apache.maven.index.IteratorSearchResponse
- All Implemented Interfaces:
- Closeable, Iterable<ArtifactInfo>
public class IteratorSearchResponse
- extends AbstractSearchResponse
- implements Iterable<ArtifactInfo>, Closeable
A Search Response for the "iterator-like" search request. The totalHitsCount reports total hits found on
index, even if the set of ArtifactInfos are usually limited! On the flipside, the hitsCount is actually unknown,
since this instance performs filtering on the fly, hence it does not know how many hits it will return ahead of time.
- Author:
- cstamas
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY_ITERATOR_RESULT_SET
public static final IteratorResultSet EMPTY_ITERATOR_RESULT_SET
EMPTY_ITERATOR_SEARCH_RESPONSE
public static final IteratorSearchResponse EMPTY_ITERATOR_SEARCH_RESPONSE
- Deprecated. Use
empty(Query)
instead.- Empty search response.
TOO_MANY_HITS_ITERATOR_SEARCH_RESPONSE
public static final IteratorSearchResponse TOO_MANY_HITS_ITERATOR_SEARCH_RESPONSE
- Deprecated. Left here for backward compatibility, but since version 4.1.0 (see MINDEXER-14) there is NO notion of "hit limit" anymore.
- Too many search response.
IteratorSearchResponse
public IteratorSearchResponse(org.apache.lucene.search.Query query,
int totalHits,
IteratorResultSet results)
getResults
public IteratorResultSet getResults()
iterator
public IteratorResultSet iterator()
- Specified by:
iterator
in interface Iterable<ArtifactInfo>
close
public void close()
throws IOException
- Description copied from class:
AbstractSearchResponse
- Frees any resource associated with this response. Should be called as last method on this response, when it's not
used anymore.
- Specified by:
close
in interface Closeable
- Overrides:
close
in class AbstractSearchResponse
- Throws:
IOException
getTotalProcessedArtifactInfoCount
public int getTotalProcessedArtifactInfoCount()
- A helper method delegating the call to the IteratorResultSet.
- Returns:
empty
public static final IteratorSearchResponse empty(org.apache.lucene.search.Query q)
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.