|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.mock.issue.index.MockIssueIndexer
@ThreadSafe public class MockIssueIndexer
Mock issue indexer that records calls indexing methods for verification.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.jira.issue.index.IssueIndexer |
---|
IssueIndexer.Analyzers |
Field Summary | |
---|---|
Collection<Issue> |
indexedIssues
|
int |
indexWorkTime
|
AtomicInteger |
optimizations
|
int |
optimizationWorkTime
|
Collection<Issue> |
reIndexedIssues
|
Constructor Summary | |
---|---|
MockIssueIndexer()
|
|
MockIssueIndexer(int indexSleepTime,
int optimizationSleepTime)
|
Method Summary | |
---|---|
Index.Result |
deindexIssues(EnclosedIterable<Issue> issues,
Context context)
Delete any existing documents for the supplied issues. |
void |
deleteIndexes()
|
org.apache.lucene.search.IndexSearcher |
getChangeHistorySearcher()
|
org.apache.lucene.search.IndexSearcher |
getCommentSearcher()
|
List<String> |
getIndexPaths()
|
String |
getIndexRootPath()
|
org.apache.lucene.search.IndexSearcher |
getIssueSearcher()
|
Index.Result |
indexIssues(EnclosedIterable<Issue> issues,
Context context)
Add documents for the supplied issues. |
Index.Result |
indexIssuesBatchMode(EnclosedIterable<Issue> issues,
Context context)
Index the given issues, use whatever is in your arsenal to do it as FAST as possible. |
Index.Result |
optimize()
|
Index.Result |
reindexComments(Collection<Comment> comments,
Context context)
Reindex a collection of issue comments. |
Index.Result |
reindexIssues(EnclosedIterable<Issue> issues,
Context context,
boolean reIndexComments,
boolean reIndexChangeHistory,
boolean conditionalUpdate)
Re-index the given issues, delete any existing documents and add new ones. |
void |
shutdown()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final int indexWorkTime
public final int optimizationWorkTime
public final Collection<Issue> indexedIssues
public final Collection<Issue> reIndexedIssues
public final AtomicInteger optimizations
Constructor Detail |
---|
public MockIssueIndexer()
public MockIssueIndexer(int indexSleepTime, int optimizationSleepTime)
Method Detail |
---|
public Index.Result indexIssues(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context)
IssueIndexer
indexIssues
in interface IssueIndexer
issues
- An iterable of issues to index.context
- for showing the user the current status.public Index.Result deindexIssues(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context)
IssueIndexer
deindexIssues
in interface IssueIndexer
issues
- An iterable of issues to index.context
- for showing the user the current status.public Index.Result reindexIssues(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context, boolean reIndexComments, boolean reIndexChangeHistory, boolean conditionalUpdate)
IssueIndexer
reindexIssues
in interface IssueIndexer
issues
- An iterable of issues to index.context
- for showing the user the current status.reIndexComments
- Set to true if you require issue comments to also be reindexed.reIndexChangeHistory
- Set to true if you require issue change history to also be reindexed.conditionalUpdate
- set to true to use conditional updates when writing to the indexpublic Index.Result indexIssuesBatchMode(@Nonnull EnclosedIterable<Issue> issues, @Nonnull Context context)
IssueIndexer
indexIssuesBatchMode
in interface IssueIndexer
issues
- An iterable of issues to index.context
- for showing the user the current status.public Index.Result reindexComments(@Nonnull Collection<Comment> comments, @Nonnull Context context)
IssueIndexer
reindexComments
in interface IssueIndexer
comments
- Comments to be reindexed.context
- for showing the user the current status.public Index.Result optimize()
optimize
in interface IssueIndexer
public void deleteIndexes()
deleteIndexes
in interface IssueIndexer
public void shutdown()
shutdown
in interface IssueIndexer
public org.apache.lucene.search.IndexSearcher getIssueSearcher()
getIssueSearcher
in interface IssueIndexer
public org.apache.lucene.search.IndexSearcher getCommentSearcher()
getCommentSearcher
in interface IssueIndexer
public org.apache.lucene.search.IndexSearcher getChangeHistorySearcher()
getChangeHistorySearcher
in interface IssueIndexer
public List<String> getIndexPaths()
getIndexPaths
in interface IssueIndexer
public String getIndexRootPath()
getIndexRootPath
in interface IssueIndexer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |