org.compass.core.lucene.engine.transaction.lucene
Class LuceneTransaction

java.lang.Object
  extended by org.compass.core.lucene.engine.transaction.AbstractTransaction
      extended by org.compass.core.lucene.engine.transaction.lucene.LuceneTransaction
All Implemented Interfaces:
LuceneSearchEngineTransaction

public class LuceneTransaction
extends AbstractTransaction

Lucene based transaction, allows to perfom dirty operations direct over the index using Lucene support for "transactions". Reads and search will be performed on the index itself without taking into account the "transactional" operations.

Author:
kimchy

Field Summary
 
Fields inherited from class org.compass.core.lucene.engine.transaction.AbstractTransaction
analyzerManager, dirty, indexManager, mapping, searchEngine
 
Constructor Summary
LuceneTransaction()
           
 
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  void doPrepare()
           
protected  void doRollback()
           
protected  void doUpdate(InternalResource resource, Analyzer analyzer)
           
 void flush()
          Supported only in batch insert transacitons.
 Resource[] get(ResourceKey resourceKey)
           
protected  IndexWriter getOrCreateIndexWriter(String subIndex)
           
 
Methods inherited from class org.compass.core.lucene.engine.transaction.AbstractTransaction
begin, closeDelegateClosed, commit, configure, create, delete, doInternalSearch, 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

LuceneTransaction

public LuceneTransaction()
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

flush

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

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

doUpdate

protected void doUpdate(InternalResource resource,
                        Analyzer analyzer)
                 throws SearchEngineException
Overrides:
doUpdate in class AbstractTransaction
Throws:
SearchEngineException

getOrCreateIndexWriter

protected IndexWriter getOrCreateIndexWriter(String subIndex)
                                      throws IOException
Throws:
IOException


Copyright (c) 2004-2008 The Compass Project.