Package com.flowable.indexing
Class ReindexManagerImpl
- java.lang.Object
-
- com.flowable.indexing.ReindexManagerImpl
-
- All Implemented Interfaces:
ReindexManager
public class ReindexManagerImpl extends Object implements ReindexManager
-
-
Field Summary
Fields Modifier and Type Field Description protected ElasticsearchClient
elasticsearchClient
protected IndexManager
indexManager
protected ProcessEngineConfiguration
processEngineConfiguration
protected ReindexingProperties
reindexingProperties
-
Constructor Summary
Constructors Constructor Description ReindexManagerImpl(IndexManager indexManager, ElasticsearchClient elasticsearchClient, ReindexingProperties reindexingProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessEngineConfiguration
getProcessEngineConfiguration()
void
reindex(String alias, ReindexRunnable reindexRunnable)
Executes the providedReindexRunnable
(containing the actual reindex logic), while taking care before and after the execution to properly housekeep the indices: 1.void
reindex(String alias, Collection<ReindexEntityPageHandler> reindexEntityPageHandlers)
UsesReindexEntityPageHandler
(s) to reindex data, page by page.void
setProcessEngineConfiguration(ProcessEngineConfiguration processEngineConfiguration)
protected boolean
waitForIndexJobsToBeProcessed()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.flowable.indexing.ReindexManager
reindex
-
-
-
-
Field Detail
-
indexManager
protected IndexManager indexManager
-
reindexingProperties
protected ReindexingProperties reindexingProperties
-
elasticsearchClient
protected ElasticsearchClient elasticsearchClient
-
processEngineConfiguration
protected ProcessEngineConfiguration processEngineConfiguration
-
-
Constructor Detail
-
ReindexManagerImpl
public ReindexManagerImpl(IndexManager indexManager, ElasticsearchClient elasticsearchClient, ReindexingProperties reindexingProperties)
-
-
Method Detail
-
reindex
public void reindex(String alias, ReindexRunnable reindexRunnable)
Description copied from interface:ReindexManager
Executes the providedReindexRunnable
(containing the actual reindex logic), while taking care before and after the execution to properly housekeep the indices: 1. String originalIndexName = getTheRealIndexName 2. Delete the alias for the index 3. create a new index (with prefix) 4. Execute custom reindex logic 5. Delete the original index Uses a genericReindexRunnable
that can contain any logic.- Specified by:
reindex
in interfaceReindexManager
-
reindex
public void reindex(String alias, Collection<ReindexEntityPageHandler> reindexEntityPageHandlers)
Description copied from interface:ReindexManager
UsesReindexEntityPageHandler
(s) to reindex data, page by page. Internally, a newReindexRunnable
will be created and theReindexManager.reindex(String, ReindexRunnable)
will be called.- Specified by:
reindex
in interfaceReindexManager
-
waitForIndexJobsToBeProcessed
protected boolean waitForIndexJobsToBeProcessed()
-
getProcessEngineConfiguration
public ProcessEngineConfiguration getProcessEngineConfiguration()
-
setProcessEngineConfiguration
public void setProcessEngineConfiguration(ProcessEngineConfiguration processEngineConfiguration)
-
-