public class DefaultBuildResultsIndexer extends AbstractIndexer implements BuildResultsIndexer
AbstractIndexer.FlushAndUnlockIndexerQueueCallback, AbstractIndexer.IndexAllCallable, AbstractIndexer.UpdateApproximateIndexingTimePerResultCallback
indexerService, luceneConnection
Constructor and Description |
---|
DefaultBuildResultsIndexer(com.atlassian.bonnie.ILuceneConnection luceneConnection,
com.atlassian.bandana.BandanaManager bandanaManager,
com.atlassian.config.db.HibernateConfig hibernateConfig,
IndexerService indexerService,
BuildResultsSummaryDao buildResultsSummaryDao,
BuildResultsSummaryDocumentFactory buildResultsSummaryDocumentFactory,
CachedPlanManager cachedPlanManager,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
void |
deIndexBuild(PlanKey planKey) |
void |
deIndexBuild(PlanKey planKey,
Set<String> affectedJiraIssuesKeys) |
void |
deIndexBuildResults(ResultsSummary summary,
boolean includeTests) |
void |
deIndexChainResults(ChainResultsSummary summary,
Set<String> affectedJiraIssuesKeys,
boolean includeTests)
Deprecated.
since 5.5
|
long |
getEstimatedReindexTime()
How long will it take to reindex all objects in this index.
|
protected BambooBandanaContext |
getIndexerBandanaContext() |
void |
indexAll(Executor executor)
Build result reindex splits workload creating tasks for every plan/job
|
long |
indexChain(ImmutableChain plan)
Indexes the build.
|
long |
indexJob(ImmutableChain immutableChain,
PlanKey jobKey)
Indexes the job.
|
long |
indexJob(ImmutableJob plan)
Indexes the build.
|
void |
indexResultSummary(ResultsSummary summary,
ImmutableChain chain,
ImmutablePlan plan)
Schedules indexing of result summary
|
void |
reIndexBuildResults(ResultsSummary summary,
ImmutableChain chain,
ImmutablePlan plan,
boolean includeTests) |
void |
reIndexBuildResults(ResultsSummary summary,
ImmutableChain chain,
ImmutablePlan plan,
Set<String> affectedJiraIssuesKeys,
boolean includeTests) |
protected void |
updateApproximateIndexingTimePerResult(long totalIndexingTime,
int entityCount) |
deleteIndex, flushAndUnlockIndexerQueue, getApproximateIndexingTimePerResult, getConcurrentIndexers, getDefaultIndexerContext, getNumberOfDocuments, lockIndexerQueue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deleteIndex, getNumberOfDocuments
public DefaultBuildResultsIndexer(com.atlassian.bonnie.ILuceneConnection luceneConnection, com.atlassian.bandana.BandanaManager bandanaManager, com.atlassian.config.db.HibernateConfig hibernateConfig, IndexerService indexerService, BuildResultsSummaryDao buildResultsSummaryDao, BuildResultsSummaryDocumentFactory buildResultsSummaryDocumentFactory, CachedPlanManager cachedPlanManager, com.atlassian.event.api.EventPublisher eventPublisher)
public void indexAll(@NotNull Executor executor) throws Exception
public long indexChain(ImmutableChain plan)
BuildResultsIndexer
indexChain
in interface BuildResultsIndexer
public long indexJob(ImmutableJob plan)
BuildResultsIndexer
indexJob
in interface BuildResultsIndexer
public long indexJob(ImmutableChain immutableChain, PlanKey jobKey)
BuildResultsIndexer
indexJob
in interface BuildResultsIndexer
immutableChain
- chain that job belongs tojobKey
- jobKey (does not need to exist in DB)public void indexResultSummary(@NotNull ResultsSummary summary, @NotNull ImmutableChain chain, @Nullable ImmutablePlan plan)
BuildResultsIndexer
indexResultSummary
in interface BuildResultsIndexer
summary
- ResultsSummary
to be indexedplan
- Plan
this summary belongs topublic void reIndexBuildResults(@NotNull ResultsSummary summary, @NotNull ImmutableChain chain, @Nullable ImmutablePlan plan, @Nullable Set<String> affectedJiraIssuesKeys, boolean includeTests) throws Exception
reIndexBuildResults
in interface BuildResultsIndexer
Exception
public void reIndexBuildResults(@NotNull ResultsSummary summary, @NotNull ImmutableChain chain, @Nullable ImmutablePlan plan, boolean includeTests) throws Exception
reIndexBuildResults
in interface BuildResultsIndexer
Exception
public void deIndexBuild(@NotNull PlanKey planKey) throws Exception
deIndexBuild
in interface BuildResultsIndexer
Exception
public void deIndexBuild(@NotNull PlanKey planKey, @NotNull Set<String> affectedJiraIssuesKeys) throws Exception
deIndexBuild
in interface BuildResultsIndexer
Exception
public void deIndexBuildResults(ResultsSummary summary, boolean includeTests)
deIndexBuildResults
in interface BuildResultsIndexer
@Deprecated public void deIndexChainResults(@NotNull ChainResultsSummary summary, Set<String> affectedJiraIssuesKeys, boolean includeTests)
deIndexChainResults
in interface BuildResultsIndexer
public long getEstimatedReindexTime()
Indexer
getEstimatedReindexTime
in interface Indexer
protected BambooBandanaContext getIndexerBandanaContext()
getIndexerBandanaContext
in class AbstractIndexer
protected void updateApproximateIndexingTimePerResult(long totalIndexingTime, int entityCount)
updateApproximateIndexingTimePerResult
in class AbstractIndexer
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.