org.hibernate.search.indexes.impl
Class SharingBufferReaderProvider.PerDirectoryLatestReader
java.lang.Object
org.hibernate.search.indexes.impl.SharingBufferReaderProvider.PerDirectoryLatestReader
- Enclosing class:
- SharingBufferReaderProvider
protected final class SharingBufferReaderProvider.PerDirectoryLatestReader
- extends Object
An instance for each DirectoryProvider,
establishing the association between "current" ReaderUsagePair
for a DirectoryProvider and it's lock.
Method Summary |
org.apache.lucene.index.IndexReader |
refreshAndGet()
Gets an updated IndexReader for the current Directory;
the index status will be checked. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
current
public SharingBufferReaderProvider.ReaderUsagePair current
- Reference to the most current IndexReader for a DirectoryProvider;
guarded by lockOnReplaceCurrent;
SharingBufferReaderProvider.PerDirectoryLatestReader
public SharingBufferReaderProvider.PerDirectoryLatestReader(org.apache.lucene.store.Directory directory)
throws IOException
- Parameters:
directory
- The Directory
for which we manage the IndexReader
.
- Throws:
IOException
- when the index initialization fails.
refreshAndGet
public org.apache.lucene.index.IndexReader 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.
Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved