org.sakaiproject.search.optimize.impl
Class OptimizeIndexManager

java.lang.Object
  extended by org.sakaiproject.search.transaction.impl.TransactionManagerImpl
      extended by org.sakaiproject.search.optimize.impl.OptimizeIndexManager
All Implemented Interfaces:
TransactionIndexManager

public class OptimizeIndexManager
extends TransactionManagerImpl

Manages the index update operations

Author:
ieb TODO Unit test

Field Summary
 
Fields inherited from class org.sakaiproject.search.transaction.impl.TransactionManagerImpl
sequence
 
Constructor Summary
OptimizeIndexManager()
           
 
Method Summary
 void addTransactionListener(TransactionListener transactionListener)
           
 void destroy()
           
 org.apache.lucene.analysis.Analyzer getAnalyzer()
           
 AnalyzerFactory getAnalyzerFactory()
           
 JournalSettings getJournalSettings()
           
protected  File getTemporarySegment(long txid)
          Get a temporary segment name based on the transactio id
 void init()
           
 IndexTransaction openTransaction(Map<String,Object> m)
          Creates a new trasaction for index update
 void setAnalyzerFactory(AnalyzerFactory analyzerFactory)
           
 void setJournalSettings(JournalSettings journalSettings)
           
 void setTransactionListeners(List<TransactionListener> transactionListeners)
           
 
Methods inherited from class org.sakaiproject.search.transaction.impl.TransactionManagerImpl
getSequence, getTransactionListeners, removeTransactionListener, setSequence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptimizeIndexManager

public OptimizeIndexManager()
Method Detail

init

public void init()
Overrides:
init in class TransactionManagerImpl

destroy

public void destroy()
Overrides:
destroy in class TransactionManagerImpl

openTransaction

public IndexTransaction openTransaction(Map<String,Object> m)
                                 throws IndexTransactionException
Description copied from interface: TransactionIndexManager
Creates a new trasaction for index update

Parameters:
m - the properties of the transaction
Returns:
Throws:
IndexTransactionException
See Also:
TransactionIndexManager.openTransaction(java.util.Map)

addTransactionListener

public void addTransactionListener(TransactionListener transactionListener)
Specified by:
addTransactionListener in interface TransactionIndexManager
Overrides:
addTransactionListener in class TransactionManagerImpl
See Also:
TransactionManagerImpl.addTransactionListener(org.sakaiproject.search.transaction.api.TransactionListener)

setTransactionListeners

public void setTransactionListeners(List<TransactionListener> transactionListeners)
Overrides:
setTransactionListeners in class TransactionManagerImpl
Parameters:
transactionListeners - the transactionListeners to set
See Also:
TransactionManagerImpl.setTransactionListeners(java.util.List)

getTemporarySegment

protected File getTemporarySegment(long txid)
                            throws IOException
Get a temporary segment name based on the transactio id

Returns:
Throws:
IOException

getAnalyzerFactory

public AnalyzerFactory getAnalyzerFactory()
Returns:
the analyzerFactory

setAnalyzerFactory

public void setAnalyzerFactory(AnalyzerFactory analyzerFactory)
Parameters:
analyzerFactory - the analyzerFactory to set

getAnalyzer

public org.apache.lucene.analysis.Analyzer getAnalyzer()
Returns:

getJournalSettings

public JournalSettings getJournalSettings()
Returns:
the journalSettings

setJournalSettings

public void setJournalSettings(JournalSettings journalSettings)
Parameters:
journalSettings - the journalSettings to set


Copyright © 2003-2012 Sakai Project. All Rights Reserved.