Class ReaderMonitor


  • public class ReaderMonitor
    extends AbstractReaderMonitor
    ReaderMonitor holds IndexReader and IndexSearcher. When ReaderMonitor is closed it do not close IndexReader and IndexSearcher as long as someone reads from them. Variable readingCount remember how many times it was read.
    Author:
    Tomasz Trela, DFKI Gmbh
    • Constructor Detail

      • ReaderMonitor

        public ReaderMonitor​(LuceneIndex index,
                             org.apache.lucene.store.Directory directory)
        If exception occur when create indexReader it will be thrown on getIndexReader or get IndexSearcher
        Parameters:
        index -
        directory - Initializes IndexReader