Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.query.impl
Class LazyIterator

java.lang.Object
  extended by org.infinispan.query.impl.AbstractIterator
      extended by org.infinispan.query.impl.LazyIterator
All Implemented Interfaces:
Iterator<Object>, ResultIterator

@NotThreadSafe
public class LazyIterator
extends AbstractIterator

Implementation for ResultIterator. This loads the results only when required and hence differs from EagerIterator which is the other implementation of ResultIterator.

Author:
Navin Surtani, Marko Luksa, Ales Justin

Field Summary
 
Fields inherited from class org.infinispan.query.impl.AbstractIterator
buffer, bufferIndex, fetchSize, index, max
 
Constructor Summary
LazyIterator(org.hibernate.search.query.engine.spi.HSQuery hSearchQuery, QueryResultLoader resultLoader, int fetchSize)
           
 
Method Summary
 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)
           
 
Methods inherited from class org.infinispan.query.impl.AbstractIterator
hasNext, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyIterator

public LazyIterator(org.hibernate.search.query.engine.spi.HSQuery hSearchQuery,
                    QueryResultLoader resultLoader,
                    int fetchSize)
Method Detail

close

public void close()
Description copied from interface: ResultIterator
This method must be called on your iterator once you have finished so that any local or remote resources can be freed up.


loadEntityInfo

protected org.hibernate.search.query.engine.spi.EntityInfo loadEntityInfo(int index)
Specified by:
loadEntityInfo in class AbstractIterator

Infinispan Distribution 5.2.6.Final-redhat-2

Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.