|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for iterating over a set of search results (see SearchResults). The interface is structured so that implementing classes may employ more efficient streaming algorithms, whereby the implementing classes may stream results in from the datastore in parallel to a client's processing of the returned results. The key is in the exception/error handling portion of the interface, where errors that may be encountered at any point in the data retrieval can be deferred to the entry that caused the error, allowing for best effort retrieval of data, instead of a rigid all or nothing approach. If an error is detected at any point in the retrieval of data, however, the iterator will become invalid and unable to be used further.
SearchResults
Method Summary | |
---|---|
boolean |
hasNext()
Determines whether there are any more results in the iterator. |
java.lang.Object |
next()
Retrieves the next result in the iterator. |
void |
remove()
Removes from the underlying search results the last result returned by the iterator. |
Method Detail |
public boolean hasNext() throws PartialResultsException
PartialResultsException
- Thrown if an error was detected
trying to determine if any more results exist.public java.lang.Object next() throws PartialResultsException
PartialResultsException
- Thrown if an error was detected
trying to obtain the next result in the iterator,
possibly due to server unavailability or a size limit being
exceeded.
NoSuchElementException
- If attempting to get the next result
when none is available.public void remove()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |