public interface ElasticsearchWorkBulker
Implementations are mutable and unlikely to be thread-safe.
| Modifier and Type | Method and Description |
|---|---|
void |
add(BulkableElasticsearchWork<?> work) |
void |
flushBulk()
Ensure that the bulk work (if any) is created.
|
boolean |
flushBulked()
Ensure that all bulked works that haven't been added to a sequence yet
are added to the underlying sequence builder.
|
void |
reset()
Reset internal state.
|
void add(BulkableElasticsearchWork<?> work)
work - A work to add to the current bulkboolean flushBulked()
After this method is called, the underlying sequence builder can
safely be used to build a new sequence, but the execution of bulked works
in this sequence will block until flushBulk() has been called.
true if works have been added to the sequence builder
as part of the current bulk,
false if they have been added as non-bulked works
(for instance if there was only one work) or if no work
was added to the sequence builder.void flushBulk()
This method expects that all works have been flushed to the sequence builder
using flushBulked() beforehand.
After this method is called, any new work added through add(BulkableElasticsearchWork)
will be added to a new bulk.
void reset()
Copyright © 2006–2017 Hibernate. All rights reserved.