Class ReaderMonitor

java.lang.Object
org.eclipse.rdf4j.sail.lucene.AbstractReaderMonitor
org.eclipse.rdf4j.sail.lucene.impl.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 Details

    • 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
  • Method Details