org.weborganic.flint
Class SearcherManager

java.lang.Object
  extended by org.weborganic.flint.SearcherManager

public class SearcherManager
extends Object

Manager for searches.

Usage:

 IndexSearcher searcher = searcherManager.get();
 try {
    
  } finally {
    searcherManager.release(searcher);
  }
 


Constructor Summary
SearcherManager(IndexReader reader)
          Create a new SearcherManager using the given writer.
SearcherManager(IndexWriter writer)
          Create a new SearcherManager using the given writer.
 
Method Summary
 void maybeReopen()
          Trigger a check to reopen the reader.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearcherManager

public SearcherManager(IndexWriter writer)
                throws IOException
Create a new SearcherManager using the given writer.

Parameters:
writer - the IndexWriter used to load the real-time reader.
Throws:
IOException - If thrown while trying to get the reader.

SearcherManager

public SearcherManager(IndexReader reader)
                throws IOException
Create a new SearcherManager using the given writer.

Parameters:
reader - the IndexWriter used to load the real-time reader.
Throws:
IOException - If thrown while trying to get the reader.
Method Detail

maybeReopen

public void maybeReopen()
                 throws InterruptedException,
                        IOException
Trigger a check to reopen the reader.

Throws:
InterruptedException
IOException