Class BulkIndexingSession
java.lang.Object
com.flowable.indexing.job.history.async.BulkIndexingSession
- All Implemented Interfaces:
org.flowable.common.engine.impl.interceptor.Session
public class BulkIndexingSession
extends java.lang.Object
implements org.flowable.common.engine.impl.interceptor.Session
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<BulkIndexRequestInterceptor>bulkIndexRequestInterceptorsprotected BulkRequestbulkRequestprotected org.flowable.common.engine.impl.interceptor.CommandContextcommandContextprotected ElasticsearchCompatibilityelasticsearchCompatibilityprotected com.fasterxml.jackson.databind.ObjectMapperobjectMapperprotected org.elasticsearch.client.RestHighLevelClientrestClient -
Constructor Summary
Constructors Constructor Description BulkIndexingSession(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, com.fasterxml.jackson.databind.ObjectMapper objectMapper, org.elasticsearch.client.RestHighLevelClient restClient, ElasticsearchCompatibility elasticsearchCompatibility, java.util.List<BulkIndexRequestInterceptor> bulkIndexRequestInterceptors) -
Method Summary
Modifier and Type Method Description voidclose()protected voidensureBulkRequestInitialized()org.elasticsearch.action.bulk.BulkResponseexecuteBulkRequest()voidflush()BulkRequestgetBulkRequest()voidindexDataWithExternalVersion(java.lang.String index, java.lang.String id, com.fasterxml.jackson.databind.node.ObjectNode objectNode, long version)protected <Resp> RespparseEntity(org.apache.http.HttpEntity entity, org.elasticsearch.common.CheckedFunction<org.elasticsearch.common.xcontent.XContentParser,Resp,java.io.IOException> entityParser)voidretryFailedBulkRequest(com.fasterxml.jackson.databind.node.ObjectNode actionNode, com.fasterxml.jackson.databind.node.ObjectNode sourceNode)voidupsertData(java.lang.String index, java.lang.String id, com.fasterxml.jackson.databind.node.ObjectNode objectNode)voidupsertDataWithScript(java.lang.String index, java.lang.String id, com.fasterxml.jackson.databind.node.ObjectNode objectNode, com.fasterxml.jackson.databind.node.ObjectNode scriptNode)
-
Field Details
-
commandContext
protected org.flowable.common.engine.impl.interceptor.CommandContext commandContext -
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper -
restClient
protected org.elasticsearch.client.RestHighLevelClient restClient -
elasticsearchCompatibility
-
bulkIndexRequestInterceptors
-
bulkRequest
-
-
Constructor Details
-
BulkIndexingSession
public BulkIndexingSession(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, com.fasterxml.jackson.databind.ObjectMapper objectMapper, org.elasticsearch.client.RestHighLevelClient restClient, ElasticsearchCompatibility elasticsearchCompatibility, java.util.List<BulkIndexRequestInterceptor> bulkIndexRequestInterceptors)
-
-
Method Details
-
upsertData
public void upsertData(java.lang.String index, java.lang.String id, com.fasterxml.jackson.databind.node.ObjectNode objectNode) -
upsertDataWithScript
public void upsertDataWithScript(java.lang.String index, java.lang.String id, com.fasterxml.jackson.databind.node.ObjectNode objectNode, com.fasterxml.jackson.databind.node.ObjectNode scriptNode) -
indexDataWithExternalVersion
public void indexDataWithExternalVersion(java.lang.String index, java.lang.String id, com.fasterxml.jackson.databind.node.ObjectNode objectNode, long version) -
retryFailedBulkRequest
public void retryFailedBulkRequest(com.fasterxml.jackson.databind.node.ObjectNode actionNode, com.fasterxml.jackson.databind.node.ObjectNode sourceNode) -
executeBulkRequest
public org.elasticsearch.action.bulk.BulkResponse executeBulkRequest() throws java.io.IOException- Throws:
java.io.IOException
-
parseEntity
protected <Resp> Resp parseEntity(org.apache.http.HttpEntity entity, org.elasticsearch.common.CheckedFunction<org.elasticsearch.common.xcontent.XContentParser,Resp,java.io.IOException> entityParser) throws java.io.IOException- Throws:
java.io.IOException
-
ensureBulkRequestInitialized
protected void ensureBulkRequestInitialized() -
flush
public void flush()- Specified by:
flushin interfaceorg.flowable.common.engine.impl.interceptor.Session
-
close
public void close()- Specified by:
closein interfaceorg.flowable.common.engine.impl.interceptor.Session
-
getBulkRequest
-