Package org.springmodules.lucene.search.factory

Examples of org.springmodules.lucene.search.factory.SearcherHolder


   * corresponding Searcher resource will
   * be created lazily by a LuceneSearcherTemplate or a search query.
   * @see org.springmodules.resource.ResourceManager#open()
   */
  public void doOpen() {
    SearcherHolder holder=new SearcherHolder(null);
    ResourceBindingManager.bindResource(this.searcherFactory, holder);
  }
View Full Code Here


   * corresponding SearcherHolder.
   * @see org.springmodules.resource.ResourceManager#close()
   * @see SearcherFactoryUtils#releaseSearcher(SearcherFactory, Searcher)
   */
  public void doClose() {
    SearcherHolder holder=(SearcherHolder)ResourceBindingManager.getResource(this.searcherFactory);

    // Remove the resource holder from the thread.
    ResourceBindingManager.unbindResource(this.searcherFactory);

    // Close searcher.
    Searcher searcher = holder.getSearcher();
    if (logger.isDebugEnabled()) {
      logger.debug("Closing Lucene searcher [" + searcher + "]");
    }
    SearcherFactoryUtils.releaseSearcher(this.searcherFactory,searcher);
  }
View Full Code Here

TOP

Related Classes of org.springmodules.lucene.search.factory.SearcherHolder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.