Package com.flowable.indexing.job
Class IndexingAsyncHistoryJobProducer
java.lang.Object
com.flowable.indexing.job.IndexingAsyncHistoryJobProducer
- All Implemented Interfaces:
IndexingHistoryJobProducer
Implements the
IndexingHistoryJobProducer
to create a new
HistoryJobEntity
which is a copy of the one that is normally created.
The reason for this is that otherwise the storing of the historical data will
be done together with sending it to Elasticsearch. Both can fail independently or the
relational db job handling might halfway decide the historical data is not yet
applicable and roll back.
To avoid this mixing, a copy of the original HistoryJobEntity
is
created with a specific HistoryJobHandler
for Elasticsearch.
This is a simple copy and no extra processing (json wise and such) is done.-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
protected int
-
Constructor Summary
ConstructorDescriptionIndexingAsyncHistoryJobProducer
(boolean gzippingEnabled, boolean jsonGroupingEnabled, int jsonGroupingThreshold) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addJsonToJob
(JobServiceConfiguration jobServiceConfiguration, HistoryJobEntity jobEntity, com.fasterxml.jackson.databind.JsonNode rootObjectNode, boolean applyCompression) protected byte[]
compress
(byte[] bytes) protected HistoryJobEntity
createJob
(AsyncIndexingHistorySession asyncHistorySession, JobServiceConfiguration jobServiceConfiguration, String jobType) protected List<HistoryJobEntity>
createJobsWithHistoricalData
(CommandContext commandContext, JobServiceConfiguration jobServiceConfiguration, List<com.fasterxml.jackson.databind.node.ObjectNode> historyObjectNodes) protected String
historyDataGenerated
(JobServiceConfiguration jobServiceConfiguration, List<com.fasterxml.jackson.databind.node.ObjectNode> historyObjectNodes, TransactionContext transactionContext) protected void
scheduleJobs
(TransactionContext transactionContext, JobServiceConfiguration jobServiceConfiguration, List<HistoryJobEntity> historyJobEntities)
-
Field Details
-
gzippingEnabled
protected boolean gzippingEnabled -
jsonGroupingEnabled
protected boolean jsonGroupingEnabled -
jsonGroupingThreshold
protected int jsonGroupingThreshold
-
-
Constructor Details
-
IndexingAsyncHistoryJobProducer
public IndexingAsyncHistoryJobProducer(boolean gzippingEnabled, boolean jsonGroupingEnabled, int jsonGroupingThreshold)
-
-
Method Details
-
historyDataGenerated
public List<HistoryJobEntity> historyDataGenerated(JobServiceConfiguration jobServiceConfiguration, List<com.fasterxml.jackson.databind.node.ObjectNode> historyObjectNodes, TransactionContext transactionContext) - Specified by:
historyDataGenerated
in interfaceIndexingHistoryJobProducer
-
createJobsWithHistoricalData
protected List<HistoryJobEntity> createJobsWithHistoricalData(CommandContext commandContext, JobServiceConfiguration jobServiceConfiguration, List<com.fasterxml.jackson.databind.node.ObjectNode> historyObjectNodes) -
createJob
protected HistoryJobEntity createJob(AsyncIndexingHistorySession asyncHistorySession, JobServiceConfiguration jobServiceConfiguration, String jobType) -
scheduleJobs
protected void scheduleJobs(TransactionContext transactionContext, JobServiceConfiguration jobServiceConfiguration, List<HistoryJobEntity> historyJobEntities) -
addJsonToJob
protected void addJsonToJob(JobServiceConfiguration jobServiceConfiguration, HistoryJobEntity jobEntity, com.fasterxml.jackson.databind.JsonNode rootObjectNode, boolean applyCompression) -
compress
protected byte[] compress(byte[] bytes) -
getJobType
-