Module org.elasticsearch.server
Package org.elasticsearch.index.shard
Class IndexingOperationListener.CompositeListener
java.lang.Object
org.elasticsearch.index.shard.IndexingOperationListener.CompositeListener
- All Implemented Interfaces:
IndexingOperationListener
- Enclosing interface:
IndexingOperationListener
public static final class IndexingOperationListener.CompositeListener
extends Object
implements IndexingOperationListener
A Composite listener that multiplexes calls to each of the listeners methods.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.index.shard.IndexingOperationListener
IndexingOperationListener.CompositeListener -
Constructor Summary
ConstructorsConstructorDescriptionCompositeListener(List<IndexingOperationListener> listeners, org.apache.logging.log4j.Logger logger) -
Method Summary
Modifier and TypeMethodDescriptionvoidpostDelete(ShardId shardId, Engine.Delete delete, Exception ex) Called after the delete operation occurred with engine level exception.voidpostDelete(ShardId shardId, Engine.Delete delete, Engine.DeleteResult result) Called after the delete operation occurred.voidpostIndex(ShardId shardId, Engine.Index index, Exception ex) Called after the indexing operation occurred with engine level exception.voidpostIndex(ShardId shardId, Engine.Index index, Engine.IndexResult result) Called after the indexing operation occurred.voidpreBulkOnPrimary(IndexShard indexShard, Supplier<ActionListener<Void>> proceedListenerSupplier) Called when aTransportShardBulkActionis about to perform index and/or delete operation(s) on a primary shard.preDelete(ShardId shardId, Engine.Delete delete) Called before the delete occurs.preIndex(ShardId shardId, Engine.Index operation) Called before the indexing occurs.
-
Constructor Details
-
CompositeListener
public CompositeListener(List<IndexingOperationListener> listeners, org.apache.logging.log4j.Logger logger)
-
-
Method Details
-
preIndex
Description copied from interface:IndexingOperationListenerCalled before the indexing occurs.- Specified by:
preIndexin interfaceIndexingOperationListener
-
postIndex
Description copied from interface:IndexingOperationListenerCalled after the indexing operation occurred. Note that this is also called when indexing a document did not succeed due to document related failures. SeeIndexingOperationListener.postIndex(ShardId, Engine.Index, Exception)for engine level failures- Specified by:
postIndexin interfaceIndexingOperationListener
-
postIndex
Description copied from interface:IndexingOperationListenerCalled after the indexing operation occurred with engine level exception. SeeIndexingOperationListener.postIndex(ShardId, Engine.Index, Engine.IndexResult)for document related failures- Specified by:
postIndexin interfaceIndexingOperationListener
-
preDelete
Description copied from interface:IndexingOperationListenerCalled before the delete occurs.- Specified by:
preDeletein interfaceIndexingOperationListener
-
postDelete
Description copied from interface:IndexingOperationListenerCalled after the delete operation occurred. Note that this is also called when deleting a document did not succeed due to document related failures. SeeIndexingOperationListener.postDelete(ShardId, Engine.Delete, Exception)for engine level failures- Specified by:
postDeletein interfaceIndexingOperationListener
-
postDelete
Description copied from interface:IndexingOperationListenerCalled after the delete operation occurred with engine level exception. SeeIndexingOperationListener.postDelete(ShardId, Engine.Delete, Engine.DeleteResult)for document related failures- Specified by:
postDeletein interfaceIndexingOperationListener
-
preBulkOnPrimary
public void preBulkOnPrimary(IndexShard indexShard, Supplier<ActionListener<Void>> proceedListenerSupplier) Description copied from interface:IndexingOperationListenerCalled 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.- Specified by:
preBulkOnPrimaryin interfaceIndexingOperationListener- 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.
-