Save This Page
Home » hibernate-search-src-20081106 » org.hibernate » search » backend » [javadoc | source]
org.hibernate.search.backend
public class: Workspace [javadoc | source]
java.lang.Object
   org.hibernate.search.backend.Workspace
Lucene workspace for a DirectoryProvider.

Constructor:
 public Workspace(SearchFactoryImplementor searchFactoryImplementor,
    DirectoryProvider provider) 
Method from org.hibernate.search.backend.Workspace Summary:
closeIndexReader,   closeIndexWriter,   getDocumentBuilder,   getEntitiesInDirectory,   getIndexReader,   getIndexWriter,   incrementModificationCounter,   lock,   optimize,   optimizerPhase,   unlock
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.search.backend.Workspace Detail:
 public synchronized  void closeIndexReader() 
    Closes a previously opened IndexReader.
 public synchronized  void closeIndexWriter() 
    Closes a previously opened IndexWriter.
 public DocumentBuilder getDocumentBuilder(Class entity) 
 public Set getEntitiesInDirectory() 
 public synchronized IndexReader getIndexReader() 
    Gets an IndexReader to alter the index, opening one if needed. The caller needs to own the lock relevant to this DirectoryProvider.
 public synchronized IndexWriter getIndexWriter(boolean batchmode) 
    Gets the IndexWriter, opening one if needed.
 public  void incrementModificationCounter(int modCount) 
    Increment the counter of modification operations done on the index. Used (currently only) by the OptimizerStrategy.
 public  void lock() 
    Acquires a lock on the DirectoryProvider backing this Workspace; this is required to use getIndexWriter(boolean), closeIndexWriter(), getIndexReader(), closeIndexReader().
 public  void optimize() 
    Used by OptimizeLuceneWork after index optimization to flag that optimization has been forced.
 public  void optimizerPhase() 
    If optimization has not been forced give a change to configured OptimizerStrategy to optimize the index.
 public synchronized  void unlock() 
    Releases the lock obtained by calling lock()