public class IndexerEventPublisher extends java.lang.Object implements IndexerListener, java.io.Closeable
| Constructor and Description |
|---|
IndexerEventPublisher(int ringBufferSize,
com.lmax.disruptor.EventHandler<IndexerEvent>... handlers) |
IndexerEventPublisher(com.lmax.disruptor.RingBuffer<IndexerEvent> ringBuffer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
closed(BulkIndexerStats stats)
Finished
|
void |
onFailure(BulkOperation op,
BulkResponse.BulkOperationResponse response)
Invoked when a
BulkOperation fails individually. |
void |
onFailure(BulkOperation op,
BulkResponse result)
Invoked when a
BulkOperation fails because the entire request to the Elastic Bulk API
failed, always returning an HTTP status code outside the 2xx range. |
void |
onFailure(BulkOperation op,
java.lang.Throwable t)
Invoked when a
BulkOperation fails because the entire request failed, usually due to
an IOException. |
void |
onSuccess(BulkOperation op)
Invoked when a
BulkOperation is successful. |
@SafeVarargs
public IndexerEventPublisher(int ringBufferSize,
com.lmax.disruptor.EventHandler<IndexerEvent>... handlers)
public IndexerEventPublisher(com.lmax.disruptor.RingBuffer<IndexerEvent> ringBuffer)
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic void closed(BulkIndexerStats stats)
IndexerListenerclosed in interface IndexerListenerstats - indexer statspublic void onFailure(BulkOperation op, BulkResponse.BulkOperationResponse response)
IndexerListenerBulkOperation fails individually. These operations always have a
status code outside the 2xx range, and they are generally not retryable because they have
status codes below the 5xx range, which are reserved for server-side issues.onFailure in interface IndexerListenerop - bulk operationresponse - bulk operation responsepublic void onFailure(BulkOperation op, BulkResponse result)
IndexerListenerBulkOperation fails because the entire request to the Elastic Bulk API
failed, always returning an HTTP status code outside the 2xx range.
Note: The bulk API request would been retried according to configured
BulkIndexerConfig.getRetryer() policy.onFailure in interface IndexerListenerop - bulk operation that failedresult - the response from the Elastic Bulk API, always with status code outside the 2xx
range.public void onFailure(BulkOperation op, java.lang.Throwable t)
IndexerListenerBulkOperation fails because the entire request failed, usually due to
an IOException. It's possible that the Elastic Bulk API never received the request.
Note: The bulk API request would been retried according to configured
BulkIndexerConfig.getRetryer() policy.onFailure in interface IndexerListenerop - bulk operation that failedt - the exception that caused failure, usually an IOExceptionpublic void onSuccess(BulkOperation op)
IndexerListenerBulkOperation is successful. These operations usually have a status
code in the 2xx range, but there are exceptions, such as 404 status code for delete
operations which are benign and merely reported that the requested record was not found.onSuccess in interface IndexerListenerop - bulk operation