public static class BulkProcessor.Builder
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
BulkProcessor |
build() |
Builds a new bulk processor.
|
BulkProcessor.Builder |
setBackoffPolicy(BackoffPolicy backoffPolicy) |
Sets a custom backoff policy.
|
BulkProcessor.Builder |
setBulkActions(int bulkActions) |
Sets when to flush a new bulk request based on the number of actions currently added.
|
BulkProcessor.Builder |
setBulkSize(ByteSizeValue bulkSize) |
Sets when to flush a new bulk request based on the size of actions currently added.
|
BulkProcessor.Builder |
setConcurrentRequests(int concurrentRequests) |
Sets the number of concurrent requests allowed to be executed.
|
BulkProcessor.Builder |
setFlushInterval(TimeValue flushInterval) |
Sets a flush interval flushing *any* bulk actions pending if the interval passes.
|
public BulkProcessor.Builder setConcurrentRequests(int concurrentRequests)
public BulkProcessor.Builder setBulkActions(int bulkActions)
public BulkProcessor.Builder setBulkSize(ByteSizeValue bulkSize)
public BulkProcessor.Builder setFlushInterval(TimeValue flushInterval)
Note, both setBulkActions(int)
and setBulkSize(org.elasticsearch.common.unit.ByteSizeValue)
can be set to -1 with the flush interval set allowing for complete async processing of bulk actions.
public BulkProcessor.Builder setBackoffPolicy(BackoffPolicy backoffPolicy)
BackoffPolicy.exponentialBackoff()
public BulkProcessor build()