Class BulkProcessor
- java.lang.Object
-
- lumis.portal.bigdata.elasticsearch.BulkProcessor
-
-
Constructor Summary
Constructors Constructor Description BulkProcessor(java.util.function.Supplier<org.elasticsearch.action.bulk.BulkProcessor> internalProcessorSupplier)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(org.elasticsearch.action.delete.DeleteRequest request)
void
add(org.elasticsearch.action.index.IndexRequest request)
boolean
awaitClose(long timeout, TimeUnit unit)
void
flush()
-
-
-
Constructor Detail
-
BulkProcessor
public BulkProcessor(java.util.function.Supplier<org.elasticsearch.action.bulk.BulkProcessor> internalProcessorSupplier)
Creates a new instance.- Parameters:
internalProcessor
- The org.elasticsearch.action.bulk.BulkProcessor supplier. This supplier must return a new BulkProcessor instance each timeSupplier.get()
is called.- Since:
- 14.0.0
-
-
Method Detail
-
awaitClose
public boolean awaitClose(long timeout, TimeUnit unit) throws InterruptedException
- Throws:
InterruptedException
- Since:
- 14.0.0
- See Also:
BulkProcessor.awaitClose(long, java.util.concurrent.TimeUnit)
-
add
public void add(org.elasticsearch.action.index.IndexRequest request)
- Since:
- 14.0.0
- See Also:
BulkProcessor.add(org.elasticsearch.action.index.IndexRequest)
-
add
public void add(org.elasticsearch.action.delete.DeleteRequest request)
- Since:
- 14.0.0
- See Also:
BulkProcessor.add(org.elasticsearch.action.delete.DeleteRequest)
-
flush
public void flush()
- Throws:
IllegalStateException
- if the internal bulk processor couldn't be closed in 5 minutesRuntimeException
- if the thread is interrupted while waiting- Since:
- 14.0.0
- See Also:
BulkProcessor.flush()
-
-