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

java.lang.Object
  extended by com.atlassian.confluence.search.lucene.tasks.IndexTaskFactory

public class IndexTaskFactory
extends Object

Creates index tasks and provides conversion into queue entries for implementations of IndexTaskQueue


Constructor Summary
IndexTaskFactory()
           
 
Method Summary
 ConfluenceIndexTask createAddChangeDocumentTask(com.atlassian.bonnie.Searchable searchable)
          Constructs an add change document task.
 ConfluenceIndexTask createAddDocumentTask(com.atlassian.bonnie.Searchable searchable)
          NOTE: Do not call this method without first calling createDeleteDocumentTask(com.atlassian.bonnie.Searchable) for the same object.
 ConfluenceIndexTask createDeleteChangeDocumentsIndexTask(com.atlassian.bonnie.Searchable searchable)
           
 ConfluenceIndexTask createDeleteChangeDocumentsIndexTask(String handle)
           
 ConfluenceIndexTask createDeleteDocumentTask(com.atlassian.bonnie.Searchable searchable)
           
 ConfluenceIndexTask createDeleteDocumentTask(String handle)
           
 OptimizeIndexTask createOptimizeIndexTask()
           
 ConfluenceIndexTask createRebuildChangeDocumentsIndexTask(com.atlassian.bonnie.Searchable searchable)
           
 UnIndexSpaceIndexTask createUnIndexSpaceTask(Space space)
           
 UnIndexSpaceIndexTask createUnIndexSpaceTask(String handle)
           
 ConfluenceIndexTask createUpdateDocumentTask(com.atlassian.bonnie.Searchable searchable)
          Returns an update document task.
 AttachmentManager getAttachmentManager()
           
 void setAnyTypeDao(AnyTypeDao anyTypeDao)
          Deprecated. since 5.2
 void setChangeDocumentBuilder(com.atlassian.bonnie.search.DocumentBuilder changeDocumentBuilder)
           
 void setContentEntityObjectDao(ContentEntityObjectDao contentEntityObjectDao)
           
 void setDocumentBuilder(com.atlassian.bonnie.search.DocumentBuilder documentBuilder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexTaskFactory

public IndexTaskFactory()
Method Detail

setDocumentBuilder

public void setDocumentBuilder(com.atlassian.bonnie.search.DocumentBuilder documentBuilder)

createUnIndexSpaceTask

public UnIndexSpaceIndexTask createUnIndexSpaceTask(String handle)
Parameters:
handle - space key

createUnIndexSpaceTask

public UnIndexSpaceIndexTask createUnIndexSpaceTask(Space space)

createDeleteDocumentTask

public ConfluenceIndexTask createDeleteDocumentTask(com.atlassian.bonnie.Searchable searchable)

createDeleteDocumentTask

public ConfluenceIndexTask createDeleteDocumentTask(String handle)

createUpdateDocumentTask

public ConfluenceIndexTask createUpdateDocumentTask(com.atlassian.bonnie.Searchable searchable)
Returns an update document task.

Parameters:
searchable - the searchable
Returns:
an update document task or null if searchable is null or not indexable

createAddDocumentTask

public ConfluenceIndexTask createAddDocumentTask(com.atlassian.bonnie.Searchable searchable)
NOTE: Do not call this method without first calling createDeleteDocumentTask(com.atlassian.bonnie.Searchable) for the same object. The index flushing strategy is intentionally inaccurate and relies on an in-memory 'flushed entries' cache to prevent the same object being flushed twice, which risks duplicate entries being created in the index immediately after the application is restarted. CONF-29072 has additional details. You probably want to use createUpdateDocumentTask(com.atlassian.bonnie.Searchable) instead - the delete operation will fail silently :)

Parameters:
searchable - the searchable
Returns:
an add document task or null if searchable is null or not indexable

createDeleteChangeDocumentsIndexTask

public ConfluenceIndexTask createDeleteChangeDocumentsIndexTask(com.atlassian.bonnie.Searchable searchable)
Parameters:
searchable -
Returns:
an index task to remove the change documents for this searchable, or a no op task otherwise.

createDeleteChangeDocumentsIndexTask

public ConfluenceIndexTask createDeleteChangeDocumentsIndexTask(String handle)
Parameters:
handle - handle to the latest version
Returns:
delete index task

createOptimizeIndexTask

public OptimizeIndexTask createOptimizeIndexTask()

createRebuildChangeDocumentsIndexTask

public ConfluenceIndexTask createRebuildChangeDocumentsIndexTask(com.atlassian.bonnie.Searchable searchable)

createAddChangeDocumentTask

public ConfluenceIndexTask createAddChangeDocumentTask(com.atlassian.bonnie.Searchable searchable)
Constructs an add change document task.

Parameters:
searchable - the searchable
Returns:
an add change document task or NoOpIndexTask if searchable is null

setChangeDocumentBuilder

public void setChangeDocumentBuilder(com.atlassian.bonnie.search.DocumentBuilder changeDocumentBuilder)

setContentEntityObjectDao

public void setContentEntityObjectDao(ContentEntityObjectDao contentEntityObjectDao)

getAttachmentManager

public AttachmentManager getAttachmentManager()

setAnyTypeDao

@Deprecated
public void setAnyTypeDao(AnyTypeDao anyTypeDao)
Deprecated. since 5.2

Parameters:
anyTypeDao -


Copyright © 2003–2015 Atlassian. All rights reserved.