com.atlassian.confluence.search.lucene.tasks
Class BulkWriteIndexTask

java.lang.Object
  extended by com.atlassian.confluence.search.lucene.tasks.BulkWriteIndexTask
All Implemented Interfaces:
com.atlassian.bonnie.ILuceneConnection.WriterAction, IndexTask, ConfluenceIndexTask

public class BulkWriteIndexTask
extends Object
implements ConfluenceIndexTask

Performs a bulk write of the specified write tasks. This is to make sure we don't open and close an index writer for every single write.


Constructor Summary
BulkWriteIndexTask(List<ConfluenceIndexTask> writeIndexTasks)
           
 
Method Summary
 String getDescription()
          A description of the task that can be presented to the user via the UI.
 List<ConfluenceIndexTask> getWriteIndexTasks()
           
 void perform(org.apache.lucene.index.IndexWriter writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BulkWriteIndexTask

public BulkWriteIndexTask(List<ConfluenceIndexTask> writeIndexTasks)
Parameters:
writeIndexTasks - writer index tasks. Required.
Throws:
IllegalArgumentException - when writeIndexTasks is null
Method Detail

getDescription

public String getDescription()
Description copied from interface: IndexTask
A description of the task that can be presented to the user via the UI.

Specified by:
getDescription in interface IndexTask
Returns:
an readable message.

perform

public void perform(org.apache.lucene.index.IndexWriter writer)
             throws IOException
Specified by:
perform in interface com.atlassian.bonnie.ILuceneConnection.WriterAction
Throws:
IOException

getWriteIndexTasks

public List<ConfluenceIndexTask> getWriteIndexTasks()


Copyright © 2003–2015 Atlassian. All rights reserved.