Class PartialFunctions

java.lang.Object
org.apache.nifi.processor.util.pattern.PartialFunctions

public class PartialFunctions extends Object
This class contains various partial functions those are reusable among process patterns.
  • Constructor Details

    • PartialFunctions

      public PartialFunctions()
  • Method Details

    • fetchSingleFlowFile

      public static <FCT> PartialFunctions.FetchFlowFiles<FCT> fetchSingleFlowFile()
    • transferRoutedFlowFiles

      public static <FCT> PartialFunctions.TransferFlowFiles<FCT> transferRoutedFlowFiles()
    • onTrigger

      public static void onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSessionFactory sessionFactory, org.apache.nifi.logging.ComponentLog logger, PartialFunctions.OnTrigger onTrigger) throws org.apache.nifi.processor.exception.ProcessException

      This method is identical to what AbstractProcessor.onTrigger(ProcessContext, ProcessSession) does.

      Create a session from ProcessSessionFactory and execute specified onTrigger function, and commit the session if onTrigger finishes successfully.

      When an Exception is thrown during execution of the onTrigger, the session will be rollback. FlowFiles being processed will be penalized.

      Throws:
      org.apache.nifi.processor.exception.ProcessException
    • onTrigger

      public static void onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSessionFactory sessionFactory, org.apache.nifi.logging.ComponentLog logger, PartialFunctions.OnTrigger onTrigger, PartialFunctions.RollbackSession rollbackSession) throws org.apache.nifi.processor.exception.ProcessException
      Throws:
      org.apache.nifi.processor.exception.ProcessException