Package org.hibernate.search.reader
Class SharingBufferReaderProvider.PerDirectoryLatestReader
java.lang.Object
org.hibernate.search.reader.SharingBufferReaderProvider.PerDirectoryLatestReader
- Enclosing class:
SharingBufferReaderProvider
An instance for each DirectoryProvider,
establishing the association between "current" ReaderUsagePair
for a DirectoryProvider and it's lock.
-
Field Summary
FieldsModifier and TypeFieldDescriptionReference to the most current IndexReader for a DirectoryProvider; guarded by lockOnReplaceCurrent; -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets an updated IndexReader for the current Directory; the index status will be checked.
-
Field Details
-
current
Reference to the most current IndexReader for a DirectoryProvider; guarded by lockOnReplaceCurrent;
-
-
Constructor Details
-
PerDirectoryLatestReader
- Parameters:
directory- TheDirectoryfor which we manage theIndexReader.- Throws:
IOException- when the index initialization fails.
-
-
Method Details
-
refreshAndGet
Gets an updated IndexReader for the current Directory; the index status will be checked.- Returns:
- the current IndexReader if it's in sync with underlying index, a new one otherwise.
-