|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sakaiproject.search.optimize.impl.OptimizeTransactionListenerImpl
public class OptimizeTransactionListenerImpl
An OptimizationTransactionListener that optimizes the index. It first collects the segments that could be optimized. If ther are more than the mergeSize then it will perform the merge into a temporary segment and if that is successfull that index will be merged in the commit phase into the permanent index
| Constructor Summary | |
|---|---|
OptimizeTransactionListenerImpl()
|
|
| Method Summary | |
|---|---|
void |
close(IndexTransaction transaction)
|
void |
commit(IndexTransaction transaction)
commit closes the temporary segment, and merges it into the permanent segment. |
void |
destroy()
|
JournalSettings |
getJournalSettings()
|
OptimizableIndex |
getOptimizableIndex()
|
void |
init()
|
void |
open(IndexTransaction transaction)
Open the index, but throw a NoOptimizationReqiredException if there are not enough segments to perfom a merge on |
void |
prepare(IndexTransaction transaction)
Perform the merge operation on the segments into a temporary segment, open the permanent segment to ensure that a writer lock can be aquired |
void |
rollback(IndexTransaction transaction)
Roll back the optimize operation |
void |
setJournalSettings(JournalSettings journalSettings)
|
void |
setOptimizableIndex(OptimizableIndex optimizableIndex)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OptimizeTransactionListenerImpl()
| Method Detail |
|---|
public void init()
public void destroy()
public void close(IndexTransaction transaction)
throws IndexTransactionException
close in interface TransactionListenerIndexTransactionExceptionTransactionListener.close(org.sakaiproject.search.transaction.api.IndexTransaction)
public void commit(IndexTransaction transaction)
throws IndexTransactionException
commit in interface TransactionListenerIndexTransactionExceptionTransactionListener.commit(org.sakaiproject.search.transaction.api.IndexTransaction)
public void open(IndexTransaction transaction)
throws IndexTransactionException
open in interface TransactionListenerIndexTransactionExceptionTransactionListener.open(org.sakaiproject.search.transaction.api.IndexTransaction)
public void prepare(IndexTransaction transaction)
throws IndexTransactionException
prepare in interface TransactionListenerIndexJournalException
IndexTransactionExceptionTransactionListener.prepare(org.sakaiproject.search.transaction.api.IndexTransaction)
public void rollback(IndexTransaction transaction)
throws IndexTransactionException
rollback in interface TransactionListenerIndexTransactionExceptionTransactionListener.rollback(org.sakaiproject.search.transaction.api.IndexTransaction)public OptimizableIndex getOptimizableIndex()
public void setOptimizableIndex(OptimizableIndex optimizableIndex)
optimizableIndex - the optimizableIndex to setpublic JournalSettings getJournalSettings()
public void setJournalSettings(JournalSettings journalSettings)
journalSettings - the journalSettings to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||