org.cdlib.xtf.textEngine
Class XtfLimIndexReader

Object
  extended by IndexReader
      extended by LimIndexReader
          extended by XtfLimIndexReader

public class XtfLimIndexReader
extends LimIndexReader

Just like a LimIndexReader except it also does a periodic check if the request has taken too long and should kill itself.


Nested Class Summary
 
Nested classes/interfaces inherited from class IndexReader
IndexReader.FieldOption
 
Field Summary
private  int killCheckCounter
           
 
Fields inherited from class IndexReader
deleter
 
Constructor Summary
XtfLimIndexReader(IndexReader toWrap, int workLimit)
          Construct the index reader
 
Method Summary
protected  void work(int amount)
          Called by LimTermDocs and LimTermPositions to notify us that a certain amount of work has been done.
 
Methods inherited from class LimIndexReader
directory, docFreq, doClose, doCommit, document, document, doDelete, doSetNorm, doUndeleteAll, equals, getCurrentVersion, getCurrentVersion, getCurrentVersion, getFieldNames, getTermFreqVector, getTermFreqVectors, getVersion, hasDeletions, hashCode, hasNorms, indexExists, indexExists, indexExists, isCurrent, isDeleted, isLocked, isLocked, isOptimized, maxDoc, norms, norms, numDocs, open, open, open, setNorm, termDocs, termDocs, termPositions, termPositions, terms, terms, toString, unlock
 
Methods inherited from class IndexReader
close, commit, deleteDocument, deleteDocuments, finalize, getDeleter, lastModified, lastModified, lastModified, main, setDeleter, setNorm, undeleteAll
 
Methods inherited from class Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

killCheckCounter

private int killCheckCounter
Constructor Detail

XtfLimIndexReader

public XtfLimIndexReader(IndexReader toWrap,
                         int workLimit)
Construct the index reader

Method Detail

work

protected final void work(int amount)
                   throws IOException
Called by LimTermDocs and LimTermPositions to notify us that a certain amount of work has been done. We check the limit, and if exceeded, throw an exception.

Overrides:
work in class LimIndexReader
Parameters:
amount - How much work has been done. The unit is typically one term or term-position.
Throws:
IOException