org.compass.core.lucene.engine.transaction.support
Class AbstractTransactionProcessor

java.lang.Object
  extended by org.compass.core.lucene.engine.transaction.support.AbstractTransactionProcessor
All Implemented Interfaces:
TransactionProcessor
Direct Known Subclasses:
AbstractSearchTransactionProcessor

public abstract class AbstractTransactionProcessor
extends Object
implements TransactionProcessor

A base class for all Lucene based transactions. Provides helper methods for Lucene index transaction management, and default state management for the transcational operations.

Author:
kimchy

Field Summary
protected  LuceneSearchEngineIndexManager indexManager
           
protected  org.apache.commons.logging.Log logger
           
protected  CompassMapping mapping
           
protected  LuceneSearchEngine searchEngine
           
protected  LuceneSearchEngineFactory searchEngineFactory
           
 
Constructor Summary
protected AbstractTransactionProcessor(org.apache.commons.logging.Log logger, LuceneSearchEngine searchEngine)
           
 
Method Summary
protected  LuceneSearchEngineInternalSearch buildInternalSearch(String[] subIndexes, String[] aliases, boolean useFieldCache)
           
protected  Hits findByQuery(LuceneSearchEngineInternalSearch internalSearch, LuceneSearchEngineQuery searchEngineQuery, Filter filter)
           
protected  ResourceMapping getResourceMapping(String alias)
           
protected  String getSettingName(String settingName)
          Returns the concatanation of LuceneEnvironment.Transaction.Processor.PREFIX + TransactionProcessor.getName() + "." + settingName.
protected  boolean isInvalidateCacheOnCommit()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.compass.core.lucene.engine.transaction.TransactionProcessor
begin, commit, create, delete, delete, find, flush, flushCommit, get, getName, internalSearch, prepare, rollback, update
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger

searchEngine

protected final LuceneSearchEngine searchEngine

searchEngineFactory

protected final LuceneSearchEngineFactory searchEngineFactory

indexManager

protected final LuceneSearchEngineIndexManager indexManager

mapping

protected final CompassMapping mapping
Constructor Detail

AbstractTransactionProcessor

protected AbstractTransactionProcessor(org.apache.commons.logging.Log logger,
                                       LuceneSearchEngine searchEngine)
Method Detail

getResourceMapping

protected ResourceMapping getResourceMapping(String alias)

buildInternalSearch

protected LuceneSearchEngineInternalSearch buildInternalSearch(String[] subIndexes,
                                                               String[] aliases,
                                                               boolean useFieldCache)
                                                        throws SearchEngineException
Throws:
SearchEngineException

findByQuery

protected Hits findByQuery(LuceneSearchEngineInternalSearch internalSearch,
                           LuceneSearchEngineQuery searchEngineQuery,
                           Filter filter)
                    throws SearchEngineException
Throws:
SearchEngineException

isInvalidateCacheOnCommit

protected boolean isInvalidateCacheOnCommit()

getSettingName

protected final String getSettingName(String settingName)
Returns the concatanation of LuceneEnvironment.Transaction.Processor.PREFIX + TransactionProcessor.getName() + "." + settingName.



Copyright (c) 2004-2009 The Compass Project.