org.compass.core.lucene.engine.transaction.readcommitted
Class TransIndex

java.lang.Object
  extended by org.compass.core.lucene.engine.transaction.readcommitted.TransIndex
All Implemented Interfaces:
CompassConfigurable

public class TransIndex
extends Object
implements CompassConfigurable

A transactional index holding a complete lucene index as the transactional index.

The transactional index can either be ram based one (default) or a file based one. If it is a file based one, the temporary index is created (by defualt) under the JAVA temporary location (with compass/translog) with a random generated transaction id.

Author:
kimchy

Constructor Summary
TransIndex(LuceneSearchEngineFactory searchEngineFactory, String subIndex, boolean concurrent)
           
 
Method Summary
 void close()
           
 void commit()
           
 void configure(CompassSettings settings)
          Configure using the given settings.
 Directory getDirectory()
           
 IndexReader getReader()
           
 IndexSearcher getSearcher()
           
 void processJob(TransactionJob job)
           
 void rollback()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransIndex

public TransIndex(LuceneSearchEngineFactory searchEngineFactory,
                  String subIndex,
                  boolean concurrent)
Method Detail

configure

public void configure(CompassSettings settings)
               throws CompassException
Description copied from interface: CompassConfigurable
Configure using the given settings.

Specified by:
configure in interface CompassConfigurable
Parameters:
settings - The settings for the configured object
Throws:
CompassException

processJob

public void processJob(TransactionJob job)
                throws Exception
Throws:
Exception

getReader

public IndexReader getReader()
                      throws IOException
Throws:
IOException

getSearcher

public IndexSearcher getSearcher()
                          throws IOException
Throws:
IOException

getDirectory

public Directory getDirectory()

commit

public void commit()
            throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException

rollback

public void rollback()
              throws IOException
Throws:
IOException


Copyright (c) 2004-2009 The Compass Project.