it.unimi.di.mg4j.index.cluster
Class AbstractIndexClusterIndexReader

java.lang.Object
  extended by it.unimi.di.mg4j.index.AbstractIndexReader
      extended by it.unimi.di.mg4j.index.cluster.AbstractIndexClusterIndexReader
All Implemented Interfaces:
IndexReader, SafelyCloseable, Closeable
Direct Known Subclasses:
DocumentalClusterIndexReader, LexicalClusterIndexReader

public abstract class AbstractIndexClusterIndexReader
extends AbstractIndexReader

An abstract implementation of an IndexReader for an IndexCluster. It just keeps track of one reader per local index in indexReader. It is up to the implementing subclasses to use the readers appropriately.

Author:
Alessandro Arrabito, Sebastiano Vigna

Field Summary
protected  IndexReader[] indexReader
          One reader per local index.
 
Fields inherited from class it.unimi.di.mg4j.index.AbstractIndexReader
closed
 
Constructor Summary
AbstractIndexClusterIndexReader(IndexCluster index, int bufferSize)
           
 
Method Summary
 void close()
           
 
Methods inherited from class it.unimi.di.mg4j.index.AbstractIndexReader
finalize, nextIterator
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.unimi.di.mg4j.index.IndexReader
documents, documents
 

Field Detail

indexReader

protected final IndexReader[] indexReader
One reader per local index.

Constructor Detail

AbstractIndexClusterIndexReader

public AbstractIndexClusterIndexReader(IndexCluster index,
                                       int bufferSize)
                                throws IOException
Throws:
IOException
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class AbstractIndexReader
Throws:
IOException