com.atlassian.bamboo.index
Class AbstractIndexer
java.lang.Object
com.atlassian.bamboo.index.AbstractIndexer
- All Implemented Interfaces:
- Indexer
- Direct Known Subclasses:
- DefaultBuildResultsIndexer, EnvironmentIndexerImpl, QuickSearchIndexerImpl, VersionIndexerImpl
public abstract class AbstractIndexer
- extends java.lang.Object
- implements Indexer
Should be in bamboo-core but bamboo-deployments depends on this
Constructor Summary |
protected |
AbstractIndexer(com.atlassian.bonnie.ILuceneConnection luceneConnection,
com.atlassian.bandana.BandanaManager bandanaManager,
com.atlassian.config.db.HibernateConfig hibernateConfig,
IndexerService indexerService)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
luceneConnection
protected final com.atlassian.bonnie.ILuceneConnection luceneConnection
indexerService
protected final IndexerService indexerService
AbstractIndexer
protected AbstractIndexer(com.atlassian.bonnie.ILuceneConnection luceneConnection,
com.atlassian.bandana.BandanaManager bandanaManager,
com.atlassian.config.db.HibernateConfig hibernateConfig,
IndexerService indexerService)
deleteIndex
public void deleteIndex()
- Description copied from interface:
Indexer
- Delete existing index.
- Specified by:
deleteIndex
in interface Indexer
getNumberOfDocuments
public int getNumberOfDocuments()
- Specified by:
getNumberOfDocuments
in interface Indexer
- Returns:
- number of documents in the index
getIndexerBandanaContext
protected abstract BambooBandanaContext getIndexerBandanaContext()
getApproximateIndexingTimePerResult
protected long getApproximateIndexingTimePerResult()
- Retrieve approximate time per result stored in Bandana for a given indexer.
- Returns:
- approximate time of indexing a single result in milliseconds
updateApproximateIndexingTimePerResult
protected void updateApproximateIndexingTimePerResult(long totalIndexingTime,
int entityCount)
getConcurrentIndexers
protected int getConcurrentIndexers()
getDefaultIndexerContext
@NotNull
protected IndexerContext getDefaultIndexerContext()
lockIndexerQueue
@NotNull
protected IndexerContext lockIndexerQueue()
flushAndUnlockIndexerQueue
protected void flushAndUnlockIndexerQueue(@NotNull
IndexerContext indexerContext)
Copyright © 2014 Atlassian Software Systems Pty Ltd. All Rights Reserved.