com.atlassian.confluence.search.lucene
Class TempIndexWriterStrategy

java.lang.Object
  extended by com.atlassian.confluence.search.lucene.TempIndexWriterStrategy
All Implemented Interfaces:
WriterStrategy

public class TempIndexWriterStrategy
extends Object
implements WriterStrategy

Writer strategy that uses the TempIndexWriter. All writer actions will be committed to temporary indexes. Once all writer actions have been completed, ensure mergeAndClose() is called. This will cause all temp indexes to be merged to the ILuceneConnection.


Constructor Summary
TempIndexWriterStrategy(com.atlassian.core.util.ProgressWrapper progressWrapper, com.atlassian.bonnie.ILuceneConnection luceneConnection, BootstrapManager bootstrapManager, com.atlassian.bonnie.analyzer.LuceneAnalyzerFactory analyzerFactory)
           
 
Method Summary
 void discardAndClose()
          Discards the temp indexes and closes connections and writers.
 void mergeAndClose()
          Merges the temp indexes to the main index and closes connections and writers.
 void perform(com.atlassian.bonnie.ILuceneConnection.WriterAction writerAction)
          Perform the specified action
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TempIndexWriterStrategy

public TempIndexWriterStrategy(com.atlassian.core.util.ProgressWrapper progressWrapper,
                               com.atlassian.bonnie.ILuceneConnection luceneConnection,
                               BootstrapManager bootstrapManager,
                               com.atlassian.bonnie.analyzer.LuceneAnalyzerFactory analyzerFactory)
Method Detail

perform

public void perform(com.atlassian.bonnie.ILuceneConnection.WriterAction writerAction)
Description copied from interface: WriterStrategy
Perform the specified action

Specified by:
perform in interface WriterStrategy

mergeAndClose

public void mergeAndClose()
Merges the temp indexes to the main index and closes connections and writers.


discardAndClose

public void discardAndClose()
Discards the temp indexes and closes connections and writers.



Copyright © 2003-2012 Atlassian. All Rights Reserved.