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

java.lang.Object
  extended by org.compass.core.lucene.engine.transaction.AbstractTransaction
      extended by org.compass.core.lucene.engine.transaction.readcommitted.ReadCommittedTransaction
All Implemented Interfaces:
LuceneSearchEngineTransaction
Direct Known Subclasses:
SerializableTransaction

public class ReadCommittedTransaction
extends AbstractTransaction

Read Committed transaction support. Allows to perform operations within a transaction and all operations will be "viewable" to the ongoing transaction, even search.

Author:
kimchy

Field Summary
 
Fields inherited from class org.compass.core.lucene.engine.transaction.AbstractTransaction
analyzerManager, dirty, indexManager, mapping, searchEngine
 
Constructor Summary
ReadCommittedTransaction()
           
 
Method Summary
protected  void doBegin()
           
protected  void doCommit(boolean onePhase)
           
protected  void doCreate(InternalResource resource, Analyzer analyzer)
           
protected  void doDelete(ResourceKey resourceKey)
           
protected  LuceneSearchEngineHits doFind(LuceneSearchEngineQuery query)
           
protected  LuceneSearchEngineInternalSearch doInternalSearch(String[] subIndexes, String[] aliases)
           
protected  void doPrepare()
           
protected  void doRollback()
           
 void flush()
          Supported only in batch insert transacitons.
 Resource[] get(ResourceKey resourceKey)
           
protected  void openIndexWriterIfNeeded(String subIndex)
           
 
Methods inherited from class org.compass.core.lucene.engine.transaction.AbstractTransaction
begin, closeDelegateClosed, commit, configure, create, delete, doUpdate, find, findByQuery, getResourceMapping, internalSearch, isDirty, prepare, removeDelegatedClose, rollback, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadCommittedTransaction

public ReadCommittedTransaction()
Method Detail

doBegin

protected void doBegin()
                throws SearchEngineException
Specified by:
doBegin in class AbstractTransaction
Throws:
SearchEngineException

doRollback

protected void doRollback()
                   throws SearchEngineException
Specified by:
doRollback in class AbstractTransaction
Throws:
SearchEngineException

doPrepare

protected void doPrepare()
                  throws SearchEngineException
Specified by:
doPrepare in class AbstractTransaction
Throws:
SearchEngineException

doCommit

protected void doCommit(boolean onePhase)
                 throws SearchEngineException
Specified by:
doCommit in class AbstractTransaction
Throws:
SearchEngineException

doInternalSearch

protected LuceneSearchEngineInternalSearch doInternalSearch(String[] subIndexes,
                                                            String[] aliases)
                                                     throws SearchEngineException
Overrides:
doInternalSearch in class AbstractTransaction
Throws:
SearchEngineException

doFind

protected LuceneSearchEngineHits doFind(LuceneSearchEngineQuery query)
                                 throws SearchEngineException
Specified by:
doFind in class AbstractTransaction
Throws:
SearchEngineException

get

public Resource[] get(ResourceKey resourceKey)
               throws SearchEngineException
Throws:
SearchEngineException

doCreate

protected void doCreate(InternalResource resource,
                        Analyzer analyzer)
                 throws SearchEngineException
Specified by:
doCreate in class AbstractTransaction
Throws:
SearchEngineException

doDelete

protected void doDelete(ResourceKey resourceKey)
                 throws SearchEngineException
Specified by:
doDelete in class AbstractTransaction
Throws:
SearchEngineException

flush

public void flush()
           throws SearchEngineException
Description copied from interface: LuceneSearchEngineTransaction
Supported only in batch insert transacitons.

Throws:
SearchEngineException

openIndexWriterIfNeeded

protected void openIndexWriterIfNeeded(String subIndex)
                                throws IOException
Throws:
IOException


Copyright (c) 2004-2008 The Compass Project.