Module org.elasticsearch.server
Package org.elasticsearch.index.shard
Interface IndexingOperationListener
- All Known Implementing Classes:
IndexingFailuresDebugListener,IndexingMemoryController,IndexingOperationListener.CompositeListener,IndexingSlowLog
public interface IndexingOperationListener
An indexing listener for indexing, delete, events.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA Composite listener that multiplexes calls to each of the listeners methods. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidpostDelete(ShardId shardId, Engine.Delete delete, Exception ex) Called after the delete operation occurred with engine level exception.default voidpostDelete(ShardId shardId, Engine.Delete delete, Engine.DeleteResult result) Called after the delete operation occurred.default voidpostIndex(ShardId shardId, Engine.Index index, Exception ex) Called after the indexing operation occurred with engine level exception.default voidpostIndex(ShardId shardId, Engine.Index index, Engine.IndexResult result) Called after the indexing operation occurred.default voidpreBulkOnPrimary(IndexShard indexShard, Supplier<ActionListener<Void>> proceedListenerSupplier) Called when aTransportShardBulkActionis about to perform index and/or delete operation(s) on a primary shard.default Engine.DeletepreDelete(ShardId shardId, Engine.Delete delete) Called before the delete occurs.default Engine.IndexpreIndex(ShardId shardId, Engine.Index operation) Called before the indexing occurs.
-
Method Details
-
preIndex
Called before the indexing occurs. -
postIndex
Called after the indexing operation occurred. Note that this is also called when indexing a document did not succeed due to document related failures. SeepostIndex(ShardId, Engine.Index, Exception)for engine level failures -
postIndex
Called after the indexing operation occurred with engine level exception. SeepostIndex(ShardId, Engine.Index, Engine.IndexResult)for document related failures -
preDelete
Called before the delete occurs. -
postDelete
Called after the delete operation occurred. Note that this is also called when deleting a document did not succeed due to document related failures. SeepostDelete(ShardId, Engine.Delete, Exception)for engine level failures -
postDelete
Called after the delete operation occurred with engine level exception. SeepostDelete(ShardId, Engine.Delete, Engine.DeleteResult)for document related failures -
preBulkOnPrimary
default void preBulkOnPrimary(IndexShard indexShard, Supplier<ActionListener<Void>> proceedListenerSupplier) Called when aTransportShardBulkActionis about to perform index and/or delete operation(s) on a primary shard. This is called from a transport thread and therefore the function should be lightweight and not block the thread. The acquired listener(s) can be asynchronously completed on another thread at a later time.- Parameters:
indexShard- the shard the bulk is about to be performed onproceedListenerSupplier- call this immediately to get a listener which must be completed so that the bulk can proceed.
-