public class IndexingServiceImpl extends Object implements IndexingService, LowLevelIndexingService
Modifier and Type | Field and Description |
---|---|
protected org.flowable.spring.job.service.SpringAsyncHistoryExecutor |
asyncHistoryExecutor |
protected List<BulkIndexRequestInterceptor> |
bulkIndexRequestInterceptors |
protected ElasticsearchClient |
elasticsearchClient |
protected boolean |
indexingEnabled |
protected IndexManager |
indexManager |
protected com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
protected ObjectSerializationService |
objectSerializationService |
Constructor and Description |
---|
IndexingServiceImpl(boolean indexingEnabled,
ElasticsearchClient elasticsearchClient,
ObjectSerializationService objectSerializationService,
IndexManager indexManager,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
org.flowable.spring.job.service.SpringAsyncHistoryExecutor asyncHistoryExecutor,
List<BulkIndexRequestInterceptor> bulkIndexRequestInterceptors) |
Modifier and Type | Method and Description |
---|---|
void |
addToBulkIndexRequest(org.flowable.common.engine.impl.interceptor.CommandContext commandContext,
com.fasterxml.jackson.databind.node.ObjectNode data,
String idFieldName) |
protected org.flowable.job.service.impl.persistence.entity.HistoryJobEntity |
createHistoryJobEntity(String handlerType) |
void |
deleteByQuery(String aliasName,
com.fasterxml.jackson.databind.node.ObjectNode query)
Delete indexed objects based on a query.
|
void |
deleteIndexedObject(String aliasName,
String id)
Delete the indexed object using the provided id.
|
protected String |
determineIndex(IndexMapping indexMapping) |
protected String |
determineIndex(com.fasterxml.jackson.databind.node.ObjectNode objectNode,
IndexedDataObject indexedDataObject) |
void |
indexObject(Object object,
String idFieldName)
Similar to
LowLevelIndexingService.indexObject(Object) , but by providing an alternative field name that contains the id,
instead of depending on the IndexingJsonConstants.PROPERTY_ID in the json. |
boolean |
isIndexingEnabled() |
void |
scheduleIndexedObjectDelete(String aliasName,
String id)
Schedule a delete of an object from an index.
|
void |
scheduleIndexing(Object object,
String tenantId)
Schedule to index a generic object, that will pass the
IndexableObjectSerializer first. |
void |
scheduleIndexing(String type,
com.fasterxml.jackson.databind.node.ObjectNode dataNode,
String tenantId)
Schedule the json directly to be indexed using the provided type.
|
protected com.fasterxml.jackson.databind.node.ObjectNode |
serializeObject(Object object) |
protected List<IndexedDataObject> |
transformObjectToIndexedDataObjects(com.fasterxml.jackson.databind.node.ObjectNode objectNode,
String idFieldName) |
void |
updateByQuery(String mappingType,
com.fasterxml.jackson.databind.node.ObjectNode data)
Perform Update by Query for the given Mapping type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addToBulkIndexRequest, indexObject
protected boolean indexingEnabled
protected ElasticsearchClient elasticsearchClient
protected ObjectSerializationService objectSerializationService
protected IndexManager indexManager
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
protected org.flowable.spring.job.service.SpringAsyncHistoryExecutor asyncHistoryExecutor
protected List<BulkIndexRequestInterceptor> bulkIndexRequestInterceptors
public IndexingServiceImpl(boolean indexingEnabled, ElasticsearchClient elasticsearchClient, ObjectSerializationService objectSerializationService, IndexManager indexManager, com.fasterxml.jackson.databind.ObjectMapper objectMapper, org.flowable.spring.job.service.SpringAsyncHistoryExecutor asyncHistoryExecutor, List<BulkIndexRequestInterceptor> bulkIndexRequestInterceptors)
public boolean isIndexingEnabled()
isIndexingEnabled
in interface IndexingService
public void indexObject(Object object, String idFieldName)
LowLevelIndexingService
LowLevelIndexingService.indexObject(Object)
, but by providing an alternative field name that contains the id,
instead of depending on the IndexingJsonConstants.PROPERTY_ID
in the json.indexObject
in interface LowLevelIndexingService
protected List<IndexedDataObject> transformObjectToIndexedDataObjects(com.fasterxml.jackson.databind.node.ObjectNode objectNode, String idFieldName)
protected com.fasterxml.jackson.databind.node.ObjectNode serializeObject(Object object)
public void scheduleIndexing(Object object, String tenantId)
IndexingService
IndexableObjectSerializer
first.scheduleIndexing
in interface IndexingService
public void scheduleIndexing(String type, com.fasterxml.jackson.databind.node.ObjectNode dataNode, String tenantId)
IndexingService
scheduleIndexing
in interface IndexingService
public void deleteIndexedObject(String aliasName, String id)
LowLevelIndexingService
deleteIndexedObject
in interface LowLevelIndexingService
public void deleteByQuery(String aliasName, com.fasterxml.jackson.databind.node.ObjectNode query)
LowLevelIndexingService
deleteByQuery
in interface LowLevelIndexingService
public void updateByQuery(String mappingType, com.fasterxml.jackson.databind.node.ObjectNode data)
LowLevelIndexingService
updateByQuery
in interface LowLevelIndexingService
mappingType
- the type of the mapping for which the update should be donedata
- the update by query request datapublic void scheduleIndexedObjectDelete(String aliasName, String id)
IndexingService
scheduleIndexedObjectDelete
in interface IndexingService
public void addToBulkIndexRequest(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, com.fasterxml.jackson.databind.node.ObjectNode data, String idFieldName)
addToBulkIndexRequest
in interface LowLevelIndexingService
protected String determineIndex(com.fasterxml.jackson.databind.node.ObjectNode objectNode, IndexedDataObject indexedDataObject)
protected String determineIndex(IndexMapping indexMapping)
protected org.flowable.job.service.impl.persistence.entity.HistoryJobEntity createHistoryJobEntity(String handlerType)
Copyright © 2019. All rights reserved.