Class SharingBufferReaderProvider.PerDirectoryLatestReader

java.lang.Object
org.hibernate.search.reader.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.
  • Field Details

  • Constructor Details

    • PerDirectoryLatestReader

      public PerDirectoryLatestReader(Directory directory) throws IOException
      Parameters:
      directory - The Directory for which we manage the IndexReader.
      Throws:
      IOException - when the index initialization fails.
  • Method Details

    • refreshAndGet

      public 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.