org.compass.core.lucene.engine.manager
Class IndexWritersManager

java.lang.Object
  extended by org.compass.core.lucene.engine.manager.IndexWritersManager

public class IndexWritersManager
extends Object

A manager responsible for opening IndexWriter. Also provides tracking of opened IndexWriter if enabled and if used by other components.

Other components, in order to use tracking, should call trackOpenIndexWriter(String, org.apache.lucene.index.IndexWriter) once an index writer is opened, and trackCloseIndexWriter(String, org.apache.lucene.index.IndexWriter) once the index writer is closed or rolled back.

Author:
kimchy

Constructor Summary
IndexWritersManager(LuceneSearchEngineIndexManager indexManager)
           
 
Method Summary
 void close()
           
 IndexWriter openIndexWriter(CompassSettings settings, Directory dir, boolean create)
           
 IndexWriter openIndexWriter(CompassSettings settings, Directory dir, boolean create, IndexDeletionPolicy deletionPolicy)
           
 IndexWriter openIndexWriter(CompassSettings settings, Directory dir, boolean create, IndexDeletionPolicy deletionPolicy, Analyzer analyzer)
           
 IndexWriter openIndexWriter(CompassSettings settings, Directory dir, IndexDeletionPolicy deletionPolicy)
           
 IndexWriter openIndexWriter(CompassSettings settings, String subIndex)
           
 void trackCloseIndexWriter(String subIndex, IndexWriter indexWriter)
           
 void trackOpenIndexWriter(String subIndex, IndexWriter indexWriter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexWritersManager

public IndexWritersManager(LuceneSearchEngineIndexManager indexManager)
Method Detail

close

public void close()

trackOpenIndexWriter

public void trackOpenIndexWriter(String subIndex,
                                 IndexWriter indexWriter)

trackCloseIndexWriter

public void trackCloseIndexWriter(String subIndex,
                                  IndexWriter indexWriter)

openIndexWriter

public IndexWriter openIndexWriter(CompassSettings settings,
                                   String subIndex)
                            throws IOException
Throws:
IOException

openIndexWriter

public IndexWriter openIndexWriter(CompassSettings settings,
                                   Directory dir,
                                   boolean create)
                            throws IOException
Throws:
IOException

openIndexWriter

public IndexWriter openIndexWriter(CompassSettings settings,
                                   Directory dir,
                                   IndexDeletionPolicy deletionPolicy)
                            throws IOException
Throws:
IOException

openIndexWriter

public IndexWriter openIndexWriter(CompassSettings settings,
                                   Directory dir,
                                   boolean create,
                                   IndexDeletionPolicy deletionPolicy)
                            throws IOException
Throws:
IOException

openIndexWriter

public IndexWriter openIndexWriter(CompassSettings settings,
                                   Directory dir,
                                   boolean create,
                                   IndexDeletionPolicy deletionPolicy,
                                   Analyzer analyzer)
                            throws IOException
Throws:
IOException


Copyright (c) 2004-2009 The Compass Project.