Package org.eclipse.rdf4j.sail.lucene
Class AbstractReaderMonitor
java.lang.Object
org.eclipse.rdf4j.sail.lucene.AbstractReaderMonitor
- Direct Known Subclasses:
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidfinal voidclose()final booleanThis method is called in LecenIndex invalidateReaders or on commitfinal voidcalled by the iteratorfinal intprotected abstract voidThis method is thread-safe (i.e.
-
Constructor Details
-
AbstractReaderMonitor
-
-
Method Details
-
getReadingCount
public final int getReadingCount() -
beginReading
public final void beginReading() -
endReading
called by the iterator- Throws:
IOException
-
closeWhenPossible
This method is called in LecenIndex invalidateReaders or on commit- Returns:
trueif the close succeeded,falseotherwise.- Throws:
IOException
-
close
- Throws:
IOException
-
handleClose
This method is thread-safe (i.e. it is not called concurrently).- Throws:
IOException
-