|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.action.bulk.BulkProcessor
public class BulkProcessor
A bulk processor is a thread safe bulk processing class, allowing to easily set when to "flush" a new bulk request (either based on number of actions, based on the size, or time), and to easily control the number of concurrent bulk requests allowed to be executed in parallel.
In order to create a new bulk processor, use theBulkProcessor.Builder
.
Nested Class Summary | |
---|---|
static class |
BulkProcessor.Builder
A builder used to create a build an instance of a bulk processor. |
static interface |
BulkProcessor.Listener
A listener for the execution. |
Method Summary | |
---|---|
BulkProcessor |
add(ActionRequest request)
|
BulkProcessor |
add(BytesReference data,
boolean contentUnsafe,
String defaultIndex,
String defaultType)
|
BulkProcessor |
add(DeleteRequest request)
Adds an DeleteRequest to the list of actions to execute. |
BulkProcessor |
add(IndexRequest request)
Adds an IndexRequest to the list of actions to execute. |
static BulkProcessor.Builder |
builder(Client client,
BulkProcessor.Listener listener)
|
void |
close()
Closes the processor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static BulkProcessor.Builder builder(Client client, BulkProcessor.Listener listener)
public void close()
public BulkProcessor add(IndexRequest request)
IndexRequest
to the list of actions to execute. Follows the same behavior of IndexRequest
(for example, if no id is provided, one will be generated, or usage of the create flag).
public BulkProcessor add(DeleteRequest request)
DeleteRequest
to the list of actions to execute.
public BulkProcessor add(ActionRequest request)
public BulkProcessor add(BytesReference data, boolean contentUnsafe, @Nullable String defaultIndex, @Nullable String defaultType) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |