Package org.apache.nifi.connectable
Class ConnectionUtils
java.lang.Object
org.apache.nifi.connectable.ConnectionUtils
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone(FlowFileRecord flowFile, Collection<Connection> destinations, FlowFileRepository flowFileRepository, ContentRepository contentRepository) Creates the FlowFileRecords and the RepositoryRecords necessary for transferring the given FlowFile to all of the given destinations.private static RepositoryRecordcreateRepositoryRecord(FlowFileRecord flowFile, FlowFileQueue destinationQueue)
-
Constructor Details
-
ConnectionUtils
public ConnectionUtils()
-
-
Method Details
-
clone
public static ConnectionUtils.FlowFileCloneResult clone(FlowFileRecord flowFile, Collection<Connection> destinations, FlowFileRepository flowFileRepository, ContentRepository contentRepository) Creates the FlowFileRecords and the RepositoryRecords necessary for transferring the given FlowFile to all of the given destinations. If only a single destination is given, the returned result will contain only the original FlowFile and a RepositoryRecord that represents that FlowFile. If multiple destinations are given, the returned result will contain the original FlowFile, as well as a cloned FlowFile for each of the destinations. If one or more clones are created, and a Content Repository is provided, the Claimant Count will be incremented for each clone (but not the original FlowFile). If the Content Repository isnull, the Claimant Counts will not be incremented.- Parameters:
flowFile- the FlowFile to clone as necessarydestinations- the destinations that the FlowFile will be transferred toflowFileRepository- the FlowFile Repository to use to generate the FlowFile ID for each clonecontentRepository- the Content Repository to use to increment the Claimant Count for each clone, ornullif the caller will take on the responsibility of incrementing the Claimant Counts- Returns:
- a FlowFileCloneResult that contains the FlowFiles to enqueue and the RepositoryRecords to create
-
createRepositoryRecord
private static RepositoryRecord createRepositoryRecord(FlowFileRecord flowFile, FlowFileQueue destinationQueue)
-