Interface ElasticsearchWorkBulker
public interface ElasticsearchWorkBulker
Aggregates bulkable works into bulks and adds all resulting works
to a sequence builder.
Implementations are mutable and unlikely to be thread-safe.
-
Method Summary
Modifier and TypeMethodDescription<T> CompletableFuture<T>add(BulkableWork<T> work) Add a bulkable work to the current bulk.voidEnsure that the bulk work (if any) is created.voidreset()Reset internal state.
-
Method Details
-
add
Add a bulkable work to the current bulk.This method also takes care of adding the bulk work execution to the current sequence if not already done, and to add the extraction of the bulkable work result to the current sequence.
- Parameters:
work- A work to add to the current bulk- Returns:
- A future that will ultimately contain the result of executing the work, or an exception.
-
finalizeBulkWork
void finalizeBulkWork()Ensure that the bulk work (if any) is created.After this method is called, any new work added through
add(BulkableWork)will be added to a new bulk. -
reset
void reset()Reset internal state.
-