Interface ElasticsearchWorkBulker
-
public interface ElasticsearchWorkBulkerAggregates bulkable works into bulks and adds all resulting works to a sequence builder.Implementations are mutable and unlikely to be thread-safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> CompletableFuture<T>add(BulkableWork<T> work)Add a bulkable work to the current bulk.voidfinalizeBulkWork()Ensure that the bulk work (if any) is created.voidreset()Reset internal state.
-
-
-
Method Detail
-
add
<T> CompletableFuture<T> add(BulkableWork<T> work)
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.
-
-