Package com.flowable.indexing.job.impl
Class BulkRequest
- java.lang.Object
-
- com.flowable.indexing.job.impl.BulkRequest
-
public class BulkRequest extends java.lang.Object
This is a custom class to do bulk requests to ES. Before, we used theBulkRequest
class from the high level client. However, this had limitations: the actual requests going to ES can't be retrieved later as everything is package-protected and final. We do need the original requests to schedule a new job for those that have failed. The alternative would be rebuilding the requests, but this is more expensive resource-wise, but definitely maintenance-wise: it would mean the logic would need to be implemented twice instead of in one place (which is of course more error-prone: with this implementation we simply take the original bulk requests and store them in the job without any additional processing. See theBulkIndexRequestExecutorImpl
class for that implementation).
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<BulkRequestItem>
bulkRequestItems
-
Constructor Summary
Constructors Constructor Description BulkRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBulkRequestItem(BulkRequestItem bulkRequestItem)
protected java.lang.String
concatenate(com.fasterxml.jackson.databind.ObjectMapper objectMapper, BulkRequestItem bulkRequestItem, ElasticsearchCompatibility elasticsearchCompatibility)
java.util.List<BulkRequestItem>
getBulkRequestItems()
java.lang.String
serialize(com.fasterxml.jackson.databind.ObjectMapper objectMapper, ElasticsearchCompatibility elasticsearchCompatibility)
void
setBulkRequestItems(java.util.List<BulkRequestItem> bulkRequestItems)
-
-
-
Field Detail
-
bulkRequestItems
protected java.util.List<BulkRequestItem> bulkRequestItems
-
-
Method Detail
-
addBulkRequestItem
public void addBulkRequestItem(BulkRequestItem bulkRequestItem)
-
serialize
public java.lang.String serialize(com.fasterxml.jackson.databind.ObjectMapper objectMapper, ElasticsearchCompatibility elasticsearchCompatibility)
-
concatenate
protected java.lang.String concatenate(com.fasterxml.jackson.databind.ObjectMapper objectMapper, BulkRequestItem bulkRequestItem, ElasticsearchCompatibility elasticsearchCompatibility)
-
getBulkRequestItems
public java.util.List<BulkRequestItem> getBulkRequestItems()
-
setBulkRequestItems
public void setBulkRequestItems(java.util.List<BulkRequestItem> bulkRequestItems)
-
-