com.atlassian.jira.sharing.index
Class DefaultSharedEntityIndexer

java.lang.Object
  extended by com.atlassian.jira.sharing.index.DefaultSharedEntityIndexer
All Implemented Interfaces:
SharedEntityIndexer

public class DefaultSharedEntityIndexer
extends Object
implements SharedEntityIndexer

default implementation

Since:
v3.13

Nested Class Summary
static class DefaultSharedEntityIndexer.DefaultEntityTypeConnectionManager
           
static interface DefaultSharedEntityIndexer.EntityDocument
          Holds a Document and an identifying Term so we can delete any pre-existing document.
static interface DefaultSharedEntityIndexer.EntityDocumentFactory
           
static interface DefaultSharedEntityIndexer.EntityTypeConnectionManager
          Responsible for getting the appropriate Index for a shared entity type
 
Constructor Summary
DefaultSharedEntityIndexer(DefaultSharedEntityIndexer.EntityTypeConnectionManager connectionManager, QueryFactory queryFactory, SharedEntityAccessor.Factory accessorFactory, DefaultSharedEntityIndexer.EntityDocumentFactory documentFactory)
           
DefaultSharedEntityIndexer(LuceneConnectionFactory connectionFactory, IndexPath indexPath, ShareTypeFactory shareTypeFactory, PermissionQueryFactory permissionQueryFactory, SharedEntityAccessor.Factory accessorFactory)
           
 
Method Summary
 String clear(SharedEntity.TypeDescriptor type)
          Clear a particular type's index.
 void deIndex(SharedEntity entity)
          Delete a document from the index.
 Collection getAllIndexPaths()
           
 SharedEntitySearcher getSearcher(SharedEntity.TypeDescriptor type)
          Get a SharedEntitySearcher for the specified SharedEntity.TypeDescriptor
 void index(SharedEntity entity)
          Add or update a document in the index.
 long optimize(SharedEntity.TypeDescriptor type)
          Optimize a particular type's index.
 void shutdown(SharedEntity.TypeDescriptor type)
          Shutdown a particular type's index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSharedEntityIndexer

public DefaultSharedEntityIndexer(LuceneConnectionFactory connectionFactory,
                                  IndexPath indexPath,
                                  ShareTypeFactory shareTypeFactory,
                                  PermissionQueryFactory permissionQueryFactory,
                                  SharedEntityAccessor.Factory accessorFactory)

DefaultSharedEntityIndexer

public DefaultSharedEntityIndexer(DefaultSharedEntityIndexer.EntityTypeConnectionManager connectionManager,
                                  QueryFactory queryFactory,
                                  SharedEntityAccessor.Factory accessorFactory,
                                  DefaultSharedEntityIndexer.EntityDocumentFactory documentFactory)
Method Detail

index

public void index(SharedEntity entity)
Description copied from interface: SharedEntityIndexer
Add or update a document in the index.

Specified by:
index in interface SharedEntityIndexer
Parameters:
entity - the entity to add to the index

deIndex

public void deIndex(SharedEntity entity)
Description copied from interface: SharedEntityIndexer
Delete a document from the index.

Specified by:
deIndex in interface SharedEntityIndexer
Parameters:
entity - the entity to remove from the index

getSearcher

public SharedEntitySearcher getSearcher(SharedEntity.TypeDescriptor type)
Description copied from interface: SharedEntityIndexer
Get a SharedEntitySearcher for the specified SharedEntity.TypeDescriptor

Specified by:
getSearcher in interface SharedEntityIndexer
Parameters:
type - the index to use when searching
Returns:
searcher for searching

optimize

public long optimize(SharedEntity.TypeDescriptor type)
Description copied from interface: SharedEntityIndexer
Optimize a particular type's index.

Specified by:
optimize in interface SharedEntityIndexer
Parameters:
type - describes the particular index
Returns:
the number of millisends taken to optimize

clear

public String clear(SharedEntity.TypeDescriptor type)
Description copied from interface: SharedEntityIndexer
Clear a particular type's index. Return the path.

Specified by:
clear in interface SharedEntityIndexer
Parameters:
type - describes the particular index

shutdown

public void shutdown(SharedEntity.TypeDescriptor type)
Description copied from interface: SharedEntityIndexer
Shutdown a particular type's index.

Specified by:
shutdown in interface SharedEntityIndexer
Parameters:
type - describes the particular index

getAllIndexPaths

public Collection getAllIndexPaths()
Specified by:
getAllIndexPaths in interface SharedEntityIndexer
Returns:
all the paths where the indexes are


Copyright © 2002-2009 Atlassian. All Rights Reserved.