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
Constructors Constructor Description IndexerManagerImpl(@NotNull com.atlassian.config.ApplicationConfiguration applicationConfig, @NotNull com.atlassian.config.db.HibernateConfig hibernateConfig, @NotNull QuickSearchIndexer quickSearchIndexer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Date
getEstimatedReindexCompletionTime()
Returns information on estimated completion time while full indexing operation is running.long
getEstimatedReindexTime()
How long will it take to reindex all indexes.boolean
isPendingFullReindex()
Check if instance is pending full reindex either because of call toIndexerManager.setPendingFullReindex()
or because of aborted full reindexboolean
isReindexInProgress()
com.google.common.util.concurrent.ListenableFuture<Boolean>
pauseIndexing()
Pause indexing.void
setPendingFullReindex()
Persist information that full reindex is requested.@NotNull com.google.common.util.concurrent.ListenableFuture<Boolean>
triggerFullReindex()
Triggers asynchronous full reindex.protected com.google.common.util.concurrent.ListenableFuture<Boolean>
triggerReindex()
-
-
-
Constructor Detail
-
IndexerManagerImpl
public IndexerManagerImpl(@NotNull @NotNull com.atlassian.config.ApplicationConfiguration applicationConfig, @NotNull @NotNull com.atlassian.config.db.HibernateConfig hibernateConfig, @NotNull @NotNull QuickSearchIndexer quickSearchIndexer)
-
-
Method Detail
-
triggerFullReindex
@NotNull public @NotNull com.google.common.util.concurrent.ListenableFuture<Boolean> 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
protected com.google.common.util.concurrent.ListenableFuture<Boolean> 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
public com.google.common.util.concurrent.ListenableFuture<Boolean> 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
public Date 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
-
-