Package org.elasticsearch.ingest
Class TestProcessor
- java.lang.Object
-
- org.elasticsearch.ingest.TestProcessor
-
- All Implemented Interfaces:
Processor
public class TestProcessor extends java.lang.Object implements Processor
Processor used for testing, keeps track of how many times it is invoked and accepts aConsumerofIngestDocumentto be called when executed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTestProcessor.Factory-
Nested classes/interfaces inherited from interface org.elasticsearch.ingest.Processor
Processor.Parameters
-
-
Constructor Summary
Constructors Constructor Description TestProcessor(java.lang.RuntimeException e)TestProcessor(java.lang.String tag, java.lang.String type, java.lang.RuntimeException e)TestProcessor(java.lang.String tag, java.lang.String type, java.util.function.Consumer<IngestDocument> ingestDocumentConsumer)TestProcessor(java.lang.String tag, java.lang.String type, java.util.function.Function<IngestDocument,IngestDocument> ingestDocumentMapper)TestProcessor(java.util.function.Consumer<IngestDocument> ingestDocumentConsumer)
-
Method Summary
Modifier and Type Method Description IngestDocumentexecute(IngestDocument ingestDocument)intgetInvokedCounter()java.lang.StringgetTag()java.lang.StringgetType()
-
-
-
Constructor Detail
-
TestProcessor
public TestProcessor(java.util.function.Consumer<IngestDocument> ingestDocumentConsumer)
-
TestProcessor
public TestProcessor(java.lang.RuntimeException e)
-
TestProcessor
public TestProcessor(java.lang.String tag, java.lang.String type, java.lang.RuntimeException e)
-
TestProcessor
public TestProcessor(java.lang.String tag, java.lang.String type, java.util.function.Consumer<IngestDocument> ingestDocumentConsumer)
-
TestProcessor
public TestProcessor(java.lang.String tag, java.lang.String type, java.util.function.Function<IngestDocument,IngestDocument> ingestDocumentMapper)
-
-
Method Detail
-
execute
public IngestDocument execute(IngestDocument ingestDocument) throws java.lang.Exception
-
getInvokedCounter
public int getInvokedCounter()
-
-