Class PartialFunctions
java.lang.Object
org.apache.nifi.processor.util.pattern.PartialFunctions
This class contains various partial functions those are reusable among process patterns.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <FCT> PartialFunctions.FetchFlowFiles<FCT> static voidonTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSessionFactory sessionFactory, org.apache.nifi.logging.ComponentLog logger, PartialFunctions.OnTrigger onTrigger) This method is identical to whatAbstractProcessor.onTrigger(ProcessContext, ProcessSession)does.static voidonTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSessionFactory sessionFactory, org.apache.nifi.logging.ComponentLog logger, PartialFunctions.OnTrigger onTrigger, PartialFunctions.RollbackSession rollbackSession) static <FCT> PartialFunctions.TransferFlowFiles<FCT>
-
Constructor Details
-
PartialFunctions
public PartialFunctions()
-
-
Method Details
-
fetchSingleFlowFile
-
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
-