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 aConsumer
ofIngestDocument
to be called when executed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TestProcessor.Factory
-
Nested classes/interfaces inherited from interface org.elasticsearch.ingest.Processor
Processor.Parameters
-
-
Constructor Summary
Constructors Constructor Description TestProcessor(java.lang.String tag, java.lang.String type, java.util.function.Consumer<IngestDocument> ingestDocumentConsumer)
TestProcessor(java.util.function.Consumer<IngestDocument> ingestDocumentConsumer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IngestDocument
execute(IngestDocument ingestDocument)
int
getInvokedCounter()
java.lang.String
getTag()
java.lang.String
getType()
-
-
-
Constructor Detail
-
TestProcessor
public TestProcessor(java.util.function.Consumer<IngestDocument> ingestDocumentConsumer)
-
TestProcessor
public TestProcessor(java.lang.String tag, java.lang.String type, java.util.function.Consumer<IngestDocument> ingestDocumentConsumer)
-
-
Method Detail
-
execute
public IngestDocument execute(IngestDocument ingestDocument) throws java.lang.Exception
-
getInvokedCounter
public int getInvokedCounter()
-
-