org.infinispan.query.clustered
Class DistributedIterator

java.lang.Object
  extended by org.infinispan.query.impl.AbstractIterator
      extended by org.infinispan.query.clustered.DistributedIterator
All Implemented Interfaces:
Iterator<Object>, ListIterator<Object>, QueryIterator
Direct Known Subclasses:
DistributedLazyIterator

public class DistributedIterator
extends AbstractIterator

DistributedIterator. Iterates on a distributed query.

Since:
5.1
Author:
Israel Lacerra

Field Summary
 
Fields inherited from class org.infinispan.query.impl.AbstractIterator
buffer, bufferIndex, cache, fetchSize, first, index, max
 
Constructor Summary
DistributedIterator(org.apache.lucene.search.Sort sort, int fetchSize, int resultSize, HashMap<UUID,ClusteredTopDocs> topDocsResponses, AdvancedCache<?,?> cache)
           
 
Method Summary
 void add(Object arg0)
           
 void close()
          This method must be called on your iterator once you have finished so that Lucene resources can be freed up.
protected  Object fetchValue(ClusteredDoc scoreDoc, ClusteredTopDocs topDoc)
           
 boolean hasNext()
           
 void jumpToResult(int index)
          Jumps to a specific index in the iterator.
 Object next()
           
 int nextIndex()
           
 Object previous()
           
 int previousIndex()
           
 void remove()
           
 void set(Object arg0)
           
 
Methods inherited from class org.infinispan.query.impl.AbstractIterator
afterFirst, beforeLast, first, hasPrevious, isAfterFirst, isBeforeLast, isFirst, isLast, last
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributedIterator

public DistributedIterator(org.apache.lucene.search.Sort sort,
                           int fetchSize,
                           int resultSize,
                           HashMap<UUID,ClusteredTopDocs> topDocsResponses,
                           AdvancedCache<?,?> cache)
Method Detail

close

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


jumpToResult

public void jumpToResult(int index)
                  throws IndexOutOfBoundsException
Description copied from interface: QueryIterator
Jumps to a specific index in the iterator.

Parameters:
index - index to jump to.
Throws:
IndexOutOfBoundsException - if the index is out of bounds

add

public void add(Object arg0)

next

public Object next()

nextIndex

public int nextIndex()

previous

public Object previous()

fetchValue

protected Object fetchValue(ClusteredDoc scoreDoc,
                            ClusteredTopDocs topDoc)

previousIndex

public int previousIndex()

remove

public void remove()

set

public void set(Object arg0)

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<Object>
Specified by:
hasNext in interface ListIterator<Object>
Overrides:
hasNext in class AbstractIterator

-->

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