public class ReindexManagerImpl extends Object implements ReindexManager
| Modifier and Type | Field and Description |
|---|---|
protected ElasticsearchClient |
elasticsearchClient |
protected IndexManager |
indexManager |
protected org.flowable.engine.ProcessEngineConfiguration |
processEngineConfiguration |
protected ReindexingProperties |
reindexingProperties |
| Constructor and Description |
|---|
ReindexManagerImpl(IndexManager indexManager,
ElasticsearchClient elasticsearchClient,
ReindexingProperties reindexingProperties) |
| Modifier and Type | Method and Description |
|---|---|
org.flowable.engine.ProcessEngineConfiguration |
getProcessEngineConfiguration() |
void |
reindex(String alias,
Collection<ReindexEntityPageHandler> reindexEntityPageHandlers)
Uses
ReindexEntityPageHandler(s) to reindex data, page by page. |
void |
reindex(String alias,
ReindexRunnable reindexRunnable)
Executes the provided
ReindexRunnable (containing the actual reindex logic), while taking care before
and after the execution to properly housekeep the indices:
1. |
void |
setProcessEngineConfiguration(org.flowable.engine.ProcessEngineConfiguration processEngineConfiguration) |
protected boolean |
waitForIndexJobsToBeProcessed() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreindexprotected IndexManager indexManager
protected ReindexingProperties reindexingProperties
protected ElasticsearchClient elasticsearchClient
protected org.flowable.engine.ProcessEngineConfiguration processEngineConfiguration
public ReindexManagerImpl(IndexManager indexManager, ElasticsearchClient elasticsearchClient, ReindexingProperties reindexingProperties)
public void reindex(String alias, ReindexRunnable reindexRunnable)
ReindexManagerReindexRunnable (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 generic ReindexRunnable that can contain any logic.reindex in interface ReindexManagerpublic void reindex(String alias, Collection<ReindexEntityPageHandler> reindexEntityPageHandlers)
ReindexManagerReindexEntityPageHandler(s) to reindex data, page by page.
Internally, a new ReindexRunnable will be created and the ReindexManager.reindex(String, ReindexRunnable) will be called.reindex in interface ReindexManagerprotected boolean waitForIndexJobsToBeProcessed()
public org.flowable.engine.ProcessEngineConfiguration getProcessEngineConfiguration()
public void setProcessEngineConfiguration(org.flowable.engine.ProcessEngineConfiguration processEngineConfiguration)
Copyright © 2019. All rights reserved.