Save This Page
Home » hibernate-search-src-20081106 » org.hibernate » search » reader » [javadoc | source]
org.hibernate.search.reader
public interface: ReaderProvider [javadoc | source]

All Known Implementing Classes:
    SharingBufferReaderProvider, SharedReaderProvider, NotSharedReaderProvider

Responsible for providing and managing the lifecycle of a read only reader. The implementation must have a no-arg constructor.

Note that the reader must be closed once opened.

Method from org.hibernate.search.reader.ReaderProvider Summary:
closeReader,   destroy,   initialize,   openReader
Method from org.hibernate.search.reader.ReaderProvider Detail:
 public  void closeReader(IndexReader reader)
    Close a reader previously opened by #openReader . The closing can be virtual.
 public  void destroy()
    Called when a SearchFactory is destroyed. This method typically releases resources. It is guaranteed to be executed after readers are released by queries (assuming no user error).
 public  void initialize(Properties props,
    SearchFactoryImplementor searchFactoryImplementor)
    Inialize the reader provider before its use.
 public IndexReader openReader(DirectoryProvider directoryProviders)
    Open a read-only reader on all the listed directory providers. The opened reader has to be closed through #closeReader(IndexReader) . The opening can be virtual.