com.atlassian.bamboo.index
Class DefaultBuildResultsIndexer

java.lang.Object
  extended by com.atlassian.bamboo.index.DefaultBuildResultsIndexer
All Implemented Interfaces:
BuildResultsIndexer

public class DefaultBuildResultsIndexer
extends java.lang.Object
implements BuildResultsIndexer


Field Summary
protected  LuceneConnection luceneConnection
           
protected  PlanManager planManager
           
protected  ResultsSummaryManager resultsSummaryManager
           
 
Constructor Summary
DefaultBuildResultsIndexer()
           
 
Method Summary
 void deIndexBuild(Plan plan)
           
 void deIndexBuildResults(ResultsSummary summary, boolean includeTests)
           
 double getApproximateTimePerResult()
          A guesstimate of how long you'd take to index an individual build result
 int getConcurrentIndexes()
           
 long indexBuild(Plan plan)
          Indexes the build.
 long indexBuildResult(ResultsSummary summary, ImmutablePlan plan)
          Build result indexed by the build thread - need to establish session to attach back to results summary.
 long optimize()
           
 long reindexAll()
          Reindexes all test results.
 void reIndexBuildResults(ResultsSummary summary, ImmutablePlan plan, boolean includeTests)
           
 void setBuildResultsSummaryDocumentFactory(BuildResultsSummaryDocumentFactory buildResultsSummaryDocumentFactory)
           
 void setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig)
           
 void setLuceneConnection(LuceneConnection luceneConnection)
           
 void setPlanManager(PlanManager planManager)
           
 void setResultsSummaryManager(ResultsSummaryManager resultsSummaryManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

luceneConnection

protected LuceneConnection luceneConnection

planManager

protected PlanManager planManager

resultsSummaryManager

protected ResultsSummaryManager resultsSummaryManager
Constructor Detail

DefaultBuildResultsIndexer

public DefaultBuildResultsIndexer()
Method Detail

reindexAll

public long reindexAll()
                throws java.lang.Exception
Description copied from interface: BuildResultsIndexer
Reindexes all test results.

Specified by:
reindexAll in interface BuildResultsIndexer
Returns:
number of millis this index operation took
Throws:
java.lang.Exception

optimize

public long optimize()
              throws java.lang.Exception
Specified by:
optimize in interface BuildResultsIndexer
Throws:
java.lang.Exception

indexBuild

public long indexBuild(Plan plan)
                throws java.lang.Exception
Description copied from interface: BuildResultsIndexer
Indexes the build.

Specified by:
indexBuild in interface BuildResultsIndexer
Returns:
number of millis this index operation took
Throws:
java.lang.Exception

getConcurrentIndexes

public int getConcurrentIndexes()

indexBuildResult

public long indexBuildResult(@NotNull
                             ResultsSummary summary,
                             ImmutablePlan plan)
                      throws java.lang.Exception
Build result indexed by the build thread - need to establish session to attach back to results summary. Only ResultsSummarys in LifeCycleState.FINISHED are indexed

Specified by:
indexBuildResult in interface BuildResultsIndexer
Parameters:
summary - ResultsSummary to be indexed
plan - Plan this summary belongs to
Returns:
timeTakenInMilliseconds
Throws:
java.lang.Exception

reIndexBuildResults

public void reIndexBuildResults(@NotNull
                                ResultsSummary summary,
                                ImmutablePlan plan,
                                boolean includeTests)
                         throws java.lang.Exception
Specified by:
reIndexBuildResults in interface BuildResultsIndexer
Throws:
java.lang.Exception

deIndexBuild

public void deIndexBuild(@NotNull
                         Plan plan)
                  throws java.lang.Exception
Specified by:
deIndexBuild in interface BuildResultsIndexer
Throws:
java.lang.Exception

deIndexBuildResults

public void deIndexBuildResults(ResultsSummary summary,
                                boolean includeTests)
Specified by:
deIndexBuildResults in interface BuildResultsIndexer

getApproximateTimePerResult

public double getApproximateTimePerResult()
Description copied from interface: BuildResultsIndexer
A guesstimate of how long you'd take to index an individual build result

Specified by:
getApproximateTimePerResult in interface BuildResultsIndexer
Returns:

setHibernateConfig

public void setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig)

setLuceneConnection

public void setLuceneConnection(LuceneConnection luceneConnection)

setBuildResultsSummaryDocumentFactory

public void setBuildResultsSummaryDocumentFactory(BuildResultsSummaryDocumentFactory buildResultsSummaryDocumentFactory)

setPlanManager

public void setPlanManager(PlanManager planManager)

setResultsSummaryManager

public void setResultsSummaryManager(ResultsSummaryManager resultsSummaryManager)


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.