public class BulkHandler extends BaseInteractiveHandler
Modifier and Type | Class and Description |
---|---|
static class |
BulkHandler.Builder
A builder used to create a build an instance of a bulk processor.
|
static interface |
BulkHandler.Listener
A listener for the execution.
|
client
Constructor and Description |
---|
BulkHandler(org.elasticsearch.common.settings.Settings settings,
org.elasticsearch.client.Client client) |
Modifier and Type | Method and Description |
---|---|
BulkHandler |
add(org.elasticsearch.action.ActionRequest request) |
BulkHandler |
add(org.elasticsearch.action.ActionRequest request,
InteractiveChannel channel) |
BulkHandler |
add(org.elasticsearch.action.delete.DeleteRequest request)
Adds an
DeleteRequest to the list of actions to execute. |
BulkHandler |
add(org.elasticsearch.action.delete.DeleteRequest request,
InteractiveChannel channel)
Adds an
DeleteRequest to the list of actions to execute. |
BulkHandler |
add(org.elasticsearch.action.index.IndexRequest request)
Adds an
IndexRequest to the list of actions to execute. |
BulkHandler |
add(org.elasticsearch.action.index.IndexRequest request,
InteractiveChannel channel)
Adds an
IndexRequest to the list of actions to execute. |
static BulkHandler.Builder |
builder(org.elasticsearch.client.Client client,
BulkHandler.Listener listener) |
void |
close()
Closes the processor.
|
void |
flush()
Flushes open bulk actions
|
void |
flush(InteractiveChannel channel)
Flushes open bulk actions
|
BulkHandler.Listener |
getListener() |
void |
handleRequest(InteractiveRequest request,
InteractiveChannel channel) |
public BulkHandler(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.client.Client client)
public void handleRequest(InteractiveRequest request, InteractiveChannel channel)
public static BulkHandler.Builder builder(org.elasticsearch.client.Client client, BulkHandler.Listener listener)
public BulkHandler.Listener getListener()
public void flush()
public void flush(InteractiveChannel channel)
public void close()
public BulkHandler add(org.elasticsearch.action.index.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 BulkHandler add(org.elasticsearch.action.delete.DeleteRequest request)
DeleteRequest
to the list of actions to execute.public BulkHandler add(org.elasticsearch.action.ActionRequest request)
public BulkHandler add(org.elasticsearch.action.index.IndexRequest request, InteractiveChannel channel)
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 BulkHandler add(org.elasticsearch.action.delete.DeleteRequest request, InteractiveChannel channel)
DeleteRequest
to the list of actions to execute.public BulkHandler add(org.elasticsearch.action.ActionRequest request, InteractiveChannel channel)
Copyright © 2012–2014. All rights reserved.