org.apache.blur.index
Class ExitableReader

java.lang.Object
  extended by org.apache.lucene.index.IndexReader
      extended by org.apache.lucene.index.CompositeReader
          extended by org.apache.lucene.index.BaseCompositeReader<org.apache.lucene.index.AtomicReader>
              extended by org.apache.lucene.index.DirectoryReader
                  extended by org.apache.lucene.index.FilterDirectoryReader
                      extended by org.apache.blur.index.ExitableReader
All Implemented Interfaces:
Closeable

public class ExitableReader
extends org.apache.lucene.index.FilterDirectoryReader

The DirectoryReader wraps a real index DirectoryReader and allows for a AtomicBoolean to be checked periodically to see if the thread should exit or not. The exit mechanism is by throw a ExitableReader.ExitingReaderException exception.


Nested Class Summary
static class ExitableReader.ExitableFields
           
static class ExitableReader.ExitableFilterAtomicReader
           
static class ExitableReader.ExitableSubReaderWrapper
           
static class ExitableReader.ExitableTerms
           
static class ExitableReader.ExitableTermsEnum
           
static class ExitableReader.ExitingReaderException
           
 
Nested classes/interfaces inherited from class org.apache.lucene.index.FilterDirectoryReader
org.apache.lucene.index.FilterDirectoryReader.StandardReaderWrapper, org.apache.lucene.index.FilterDirectoryReader.SubReaderWrapper
 
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader
org.apache.lucene.index.IndexReader.ReaderClosedListener
 
Field Summary
 
Fields inherited from class org.apache.lucene.index.DirectoryReader
DEFAULT_TERMS_INDEX_DIVISOR
 
Constructor Summary
ExitableReader(org.apache.lucene.index.DirectoryReader in)
           
ExitableReader(org.apache.lucene.index.DirectoryReader in, ExitObject exitObject)
           
 
Method Summary
 AtomicBoolean getRunning()
           
 void reset()
           
 void setRunning(AtomicBoolean running)
           
 String toString()
           
 
Methods inherited from class org.apache.lucene.index.FilterDirectoryReader
getIndexCommit, getVersion, isCurrent
 
Methods inherited from class org.apache.lucene.index.DirectoryReader
directory, indexExists, listCommits, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged
 
Methods inherited from class org.apache.lucene.index.BaseCompositeReader
docFreq, document, getDocCount, getSumDocFreq, getSumTotalTermFreq, getTermVectors, maxDoc, numDocs, totalTermFreq
 
Methods inherited from class org.apache.lucene.index.CompositeReader
getContext
 
Methods inherited from class org.apache.lucene.index.IndexReader
addReaderClosedListener, close, decRef, document, document, equals, getCombinedCoreAndDeletesKey, getCoreCacheKey, getRefCount, getTermVector, hasDeletions, hashCode, incRef, leaves, numDeletedDocs, registerParentReader, removeReaderClosedListener, tryIncRef
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExitableReader

public ExitableReader(org.apache.lucene.index.DirectoryReader in)

ExitableReader

public ExitableReader(org.apache.lucene.index.DirectoryReader in,
                      ExitObject exitObject)
Method Detail

getRunning

public AtomicBoolean getRunning()

setRunning

public void setRunning(AtomicBoolean running)

reset

public void reset()

toString

public String toString()
Overrides:
toString in class org.apache.lucene.index.CompositeReader


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.