Class CompoundProcessor

  • All Implemented Interfaces:
    Processor

    public class CompoundProcessor
    extends java.lang.Object
    implements Processor
    A Processor that executes a list of other "processors". It executes a separate list of "onFailureProcessors" when any of the processors throw an Exception.
    • Field Detail

      • ON_FAILURE_MESSAGE_FIELD

        public static final java.lang.String ON_FAILURE_MESSAGE_FIELD
        See Also:
        Constant Field Values
      • ON_FAILURE_PROCESSOR_TYPE_FIELD

        public static final java.lang.String ON_FAILURE_PROCESSOR_TYPE_FIELD
        See Also:
        Constant Field Values
      • ON_FAILURE_PROCESSOR_TAG_FIELD

        public static final java.lang.String ON_FAILURE_PROCESSOR_TAG_FIELD
        See Also:
        Constant Field Values
    • Constructor Detail

      • CompoundProcessor

        public CompoundProcessor​(Processor... processor)
      • CompoundProcessor

        public CompoundProcessor​(boolean ignoreFailure,
                                 java.util.List<Processor> processors,
                                 java.util.List<Processor> onFailureProcessors)
    • Method Detail

      • isIgnoreFailure

        public boolean isIgnoreFailure()
      • getOnFailureProcessors

        public java.util.List<Processor> getOnFailureProcessors()
      • getProcessors

        public java.util.List<Processor> getProcessors()
      • flattenProcessors

        public java.util.List<Processor> flattenProcessors()
      • getType

        public java.lang.String getType()
        Description copied from interface: Processor
        Gets the type of a processor
        Specified by:
        getType in interface Processor
      • getTag

        public java.lang.String getTag()
        Description copied from interface: Processor
        Gets the tag of a processor.
        Specified by:
        getTag in interface Processor
      • execute

        public IngestDocument execute​(IngestDocument ingestDocument)
                               throws java.lang.Exception
        Description copied from interface: Processor
        Introspect and potentially modify the incoming data.
        Specified by:
        execute in interface Processor
        Returns:
        If null is returned then the current document will be dropped and not be indexed, otherwise this document will be kept and indexed
        Throws:
        java.lang.Exception