Class ReaderMonitor
java.lang.Object
org.eclipse.rdf4j.sail.lucene.AbstractReaderMonitor
org.eclipse.rdf4j.sail.lucene.impl.ReaderMonitor
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 Summary
ConstructorDescriptionReaderMonitor
(LuceneIndex index, org.apache.lucene.store.Directory directory) If exception occur when create indexReader it will be thrown on getIndexReader or get IndexSearcher -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.lucene.search.IndexSearcher
protected void
This method is thread-safe (i.e.Methods inherited from class org.eclipse.rdf4j.sail.lucene.AbstractReaderMonitor
beginReading, close, closeWhenPossible, endReading, getReadingCount
-
Constructor Details
-
ReaderMonitor
If exception occur when create indexReader it will be thrown on getIndexReader or get IndexSearcher- Parameters:
index
-directory
- Initializes IndexReader
-
-
Method Details
-
handleClose
Description copied from class:AbstractReaderMonitor
This method is thread-safe (i.e. it is not called concurrently).- Specified by:
handleClose
in classAbstractReaderMonitor
- Throws:
IOException
-
getIndexSearcher
- Throws:
IOException
-