@NotThreadSafe public class LazyIterator extends AbstractIterator
ResultIterator
. This loads the results only when required
and hence differs from EagerIterator
which is the other implementation of ResultIterator.buffer, bufferIndex, fetchSize, index, max
Constructor and Description |
---|
LazyIterator(org.hibernate.search.query.engine.spi.HSQuery hSearchQuery,
QueryResultLoader resultLoader,
int fetchSize) |
Modifier and Type | Method and Description |
---|---|
void |
close()
This method must be called on your iterator once you have finished so that any local
or remote resources can be freed up.
|
protected org.hibernate.search.query.engine.spi.EntityInfo |
loadEntityInfo(int index) |
hasNext, next, remove
public LazyIterator(org.hibernate.search.query.engine.spi.HSQuery hSearchQuery, QueryResultLoader resultLoader, int fetchSize)
public void close()
ResultIterator
protected org.hibernate.search.query.engine.spi.EntityInfo loadEntityInfo(int index)
loadEntityInfo
in class AbstractIterator
Copyright © 2017 JBoss, a division of Red Hat. All Rights Reserved.