Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.search.reader
Class SharingBufferReaderProvider.PerDirectoryLatestReader

    java.lang.Object
      org.hibernate.search.reader.SharingBufferReaderProvider.PerDirectoryLatestReader

Enclosing class:
  SharingBufferReaderProvider

    protected final class SharingBufferReaderProvider.PerDirectoryLatestReader

extends java.lang.Object

An instance for each DirectoryProvider, establishing the association between "current" ReaderUsagePair for a DirectoryProvider and it's lock.

Field Summary
`SharingBufferReaderProvider.ReaderUsagePair` | `current` Reference to the most current IndexReader for a DirectoryProvider; guarded by lockOnReplaceCurrent;

Constructor Summary
`SharingBufferReaderProvider.PerDirectoryLatestReader(org.apache.lucene.store.Directory directory)`

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`

Field Detail

### current

    public SharingBufferReaderProvider.ReaderUsagePair current

  Reference to the most current IndexReader for a DirectoryProvider; guarded by lockOnReplaceCurrent;

Constructor Detail

### SharingBufferReaderProvider.PerDirectoryLatestReader

    public SharingBufferReaderProvider.PerDirectoryLatestReader(org.apache.lucene.store.Directory directory)
                                                         throws java.io.IOException

Parameters:
  `directory` - The `Directory` for which we manage the `IndexReader`.
Throws:
  `java.io.IOException` - when the index initialization fails.

Method Detail

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2010 Hibernate. All Rights Reserved.