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>
bulkIndexRequestInterceptors
protected BulkRequest
bulkRequest
protected org.flowable.common.engine.impl.interceptor.CommandContext
commandContext
protected ElasticsearchCompatibility
elasticsearchCompatibility
protected com.fasterxml.jackson.databind.ObjectMapper
objectMapper
protected org.elasticsearch.client.RestHighLevelClient
restClient
-
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 void
close()
protected void
ensureBulkRequestInitialized()
org.elasticsearch.action.bulk.BulkResponse
executeBulkRequest()
void
flush()
BulkRequest
getBulkRequest()
void
indexDataWithExternalVersion(java.lang.String index, java.lang.String id, com.fasterxml.jackson.databind.node.ObjectNode objectNode, long version)
protected <Resp> Resp
parseEntity(org.apache.http.HttpEntity entity, org.elasticsearch.common.CheckedFunction<org.elasticsearch.common.xcontent.XContentParser,Resp,java.io.IOException> entityParser)
void
retryFailedBulkRequest(com.fasterxml.jackson.databind.node.ObjectNode actionNode, com.fasterxml.jackson.databind.node.ObjectNode sourceNode)
void
upsertData(java.lang.String index, java.lang.String id, com.fasterxml.jackson.databind.node.ObjectNode objectNode)
void
upsertDataWithScript(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:
flush
in interfaceorg.flowable.common.engine.impl.interceptor.Session
-
close
public void close()- Specified by:
close
in interfaceorg.flowable.common.engine.impl.interceptor.Session
-
getBulkRequest
-