org.apache.maven.index
Interface IteratorResultSet

All Superinterfaces:
Closeable, Iterable<ArtifactInfo>, Iterator<ArtifactInfo>
All Known Implementing Classes:
DefaultIteratorResultSet

public interface IteratorResultSet
extends Iterator<ArtifactInfo>, Iterable<ArtifactInfo>, Closeable

IteratorResultSet, that returns the result hit's in "iterator-like fashion", instead lifting all the hits into memory (and bashing IO and RAM consumption). This makes search making client memory usage thin, and makes possible to implement things like "streaming" results etc. The result set is java.util.Iterator, but is made also java.lang.Iterable to make it possible to take part in operations like "for-each", but it will usually return itself as Iterator.

Author:
cstamas

Method Summary
 int getTotalProcessedArtifactInfoCount()
          Returns the up-to-date number of the actual number of loaded Lucene Documents that were converted into ArtifactInfo object until last next() invocation.
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

getTotalProcessedArtifactInfoCount

int getTotalProcessedArtifactInfoCount()
Returns the up-to-date number of the actual number of loaded Lucene Documents that were converted into ArtifactInfo object until last next() invocation. Warning: this method will return ALL touched/loaded document count, even those that are filtered out and NOT returned by iterator's next() method!

Returns:
total number of processed ArtifactInfos so far


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.