public static class BulkHandler.Builder extends Object
Constructor and Description |
---|
BulkHandler.Builder(org.elasticsearch.client.Client client,
BulkHandler.Listener listener)
Creates a builder of bulk processor with the client to use and the
listener that will be used to be notified on the completion of bulk
requests.
|
Modifier and Type | Method and Description |
---|---|
BulkHandler |
build()
Builds a new bulk processor.
|
BulkHandler.Builder |
setBulkActions(int bulkActions)
Sets when to flush a new bulk request based on the number of actions
currently added.
|
BulkHandler.Builder |
setConcurrentRequests(int concurrentRequests)
Sets the number of concurrent requests allowed to be executed.
|
BulkHandler.Builder |
setFlushInterval(org.elasticsearch.common.unit.TimeValue flushInterval)
Sets a flush interval flushing *any* bulk actions pending if the
interval passes.
|
public BulkHandler.Builder(org.elasticsearch.client.Client client, BulkHandler.Listener listener)
public BulkHandler.Builder setConcurrentRequests(int concurrentRequests)
public BulkHandler.Builder setBulkActions(int bulkActions)
public BulkHandler.Builder setFlushInterval(org.elasticsearch.common.unit.TimeValue flushInterval)
setBulkActions(int)
can
be set to -1 with the flush interval set allowing for
complete async processing of bulk actions.public BulkHandler build()
Copyright © 2012–2014. All rights reserved.