Package com.atlassian.bamboo.index
Class IndexerManagerImpl
java.lang.Object
com.atlassian.bamboo.index.IndexerManagerImpl
- All Implemented Interfaces:
IndexerManager
,org.springframework.beans.factory.DisposableBean
public class IndexerManagerImpl
extends Object
implements IndexerManager, org.springframework.beans.factory.DisposableBean
-
Constructor Summary
ConstructorDescriptionIndexerManagerImpl
(@NotNull com.atlassian.config.ApplicationConfiguration applicationConfig, @NotNull com.atlassian.config.db.HibernateConfig hibernateConfig, @NotNull QuickSearchIndexer quickSearchIndexer) -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Returns information on estimated completion time while full indexing operation is running.long
How long will it take to reindex all indexes.boolean
Check if instance is pending full reindex either because of call toIndexerManager.setPendingFullReindex()
or because of aborted full reindexboolean
Pause indexing.void
Persist information that full reindex is requested.Triggers asynchronous full reindex.protected com.google.common.util.concurrent.ListenableFuture<Boolean>
-
Constructor Details
-
IndexerManagerImpl
public IndexerManagerImpl(@NotNull @NotNull com.atlassian.config.ApplicationConfiguration applicationConfig, @NotNull @NotNull com.atlassian.config.db.HibernateConfig hibernateConfig, @NotNull @NotNull QuickSearchIndexer quickSearchIndexer)
-
-
Method Details
-
triggerFullReindex
Description copied from interface:IndexerManager
Triggers asynchronous full reindex.- Specified by:
triggerFullReindex
in interfaceIndexerManager
- Returns:
- Future object that will return true on successful operation completion
-
destroy
public void destroy()- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
-
triggerReindex
-
isReindexInProgress
public boolean isReindexInProgress()- Specified by:
isReindexInProgress
in interfaceIndexerManager
- Returns:
- true if reindex is running
-
setPendingFullReindex
public void setPendingFullReindex()Description copied from interface:IndexerManager
Persist information that full reindex is requested. This flag will be used during Bamboo startup, it is supposed to be set by import/upgrade only and will be cleared by the next successful full reindex.- Specified by:
setPendingFullReindex
in interfaceIndexerManager
-
isPendingFullReindex
public boolean isPendingFullReindex()Description copied from interface:IndexerManager
Check if instance is pending full reindex either because of call toIndexerManager.setPendingFullReindex()
or because of aborted full reindex- Specified by:
isPendingFullReindex
in interfaceIndexerManager
- Returns:
- true if there's full reindex pending
-
pauseIndexing
Description copied from interface:IndexerManager
Pause indexing.- Specified by:
pauseIndexing
in interfaceIndexerManager
- Returns:
- future which allows to be notified when index in progress is finished.
-
getEstimatedReindexTime
public long getEstimatedReindexTime()Description copied from interface:IndexerManager
How long will it take to reindex all indexes.- Specified by:
getEstimatedReindexTime
in interfaceIndexerManager
- Returns:
- seconds of how long
-
getEstimatedReindexCompletionTime
Description copied from interface:IndexerManager
Returns information on estimated completion time while full indexing operation is running. Time is calculated based on previous indexer runs and is not refreshed during reindex operation.- Specified by:
getEstimatedReindexCompletionTime
in interfaceIndexerManager
- Returns:
- estimated completion date, null when no reindex operation is running at the moment
-