com.atlassian.jira.sharing.index
Interface SharedEntityIndexer

All Known Implementing Classes:
DefaultSharedEntityIndexer, MockSharedEntityIndexer

public interface SharedEntityIndexer

Responsible for actually indexing a SharedEntity.

Since:
v3.13

Method Summary
 String clear(SharedEntity.TypeDescriptor<?> type)
          Clear a particular type's index.
 Index.Result deIndex(Set<SharedEntity> sharedEntities, boolean updateReplicatedIndex)
          Delete multiple documents in the index
 Index.Result deIndex(SharedEntity entity)
          Delete a document from the index.
 Collection<String> getAllIndexPaths()
           
<S extends SharedEntity>
SharedEntitySearcher<S>
getSearcher(SharedEntity.TypeDescriptor<S> type)
          Get a SharedEntitySearcher for the specified SharedEntity.TypeDescriptor
 Index.Result index(Set<SharedEntity> sharedEntities, boolean updateReplicatedIndex)
          Add or update multiple documents in the index
 Index.Result index(SharedEntity entity)
          Add or update a document in the index.
 Index.Result index(SharedEntity entity, boolean updateReplicatedIndex)
          Add or update a document in the index.
 long optimize(SharedEntity.TypeDescriptor<?> type)
          Optimize a particular type's index.
 void recreate(SharedEntity.TypeDescriptor<?> type)
          Recreate the index.
 void shutdown(SharedEntity.TypeDescriptor<?> type)
          Shutdown a particular type's index.
 

Method Detail

index

Index.Result index(SharedEntity entity)
Add or update a document in the index.

Parameters:
entity - the entity to add to the index

deIndex

Index.Result deIndex(SharedEntity entity)
Delete a document from the index.

Parameters:
entity - the entity to remove from the index

index

Index.Result index(SharedEntity entity,
                   boolean updateReplicatedIndex)
Add or update a document in the index.

Parameters:
entity - the entity to add to the index
updateReplicatedIndex - whether to update the replicated index or not
Since:
v6.1

index

Index.Result index(Set<SharedEntity> sharedEntities,
                   boolean updateReplicatedIndex)
Add or update multiple documents in the index

Parameters:
sharedEntities - a Set of entities to add to the index
updateReplicatedIndex - whether to update the replicated index or not
Since:
v6.1

deIndex

Index.Result deIndex(Set<SharedEntity> sharedEntities,
                     boolean updateReplicatedIndex)
Delete multiple documents in the index

Parameters:
sharedEntities - a Set of entities to remove from the index
updateReplicatedIndex - whether to update the replicated index or not
Since:
v6.1

getSearcher

<S extends SharedEntity> SharedEntitySearcher<S> getSearcher(SharedEntity.TypeDescriptor<S> type)
Get a SharedEntitySearcher for the specified SharedEntity.TypeDescriptor

Parameters:
type - the index to use when searching
Returns:
searcher for searching

optimize

long optimize(SharedEntity.TypeDescriptor<?> type)
Optimize a particular type's index.

Parameters:
type - describes the particular index
Returns:
the number of milliseconds taken to optimize

shutdown

void shutdown(SharedEntity.TypeDescriptor<?> type)
Shutdown a particular type's index.

Parameters:
type - describes the particular index

clear

String clear(SharedEntity.TypeDescriptor<?> type)
Clear a particular type's index. Return the path.

Parameters:
type - describes the particular index

getAllIndexPaths

Collection<String> getAllIndexPaths()
Returns:
all the paths where the indexes are

recreate

void recreate(SharedEntity.TypeDescriptor<?> type)
Recreate the index. Clear it if it currently exists, create a new one if it doesn't.



Copyright © 2002-2014 Atlassian. All Rights Reserved.