Class StandardDataFlow

java.lang.Object
org.apache.nifi.cluster.protocol.StandardDataFlow
All Implemented Interfaces:
Serializable, org.apache.nifi.cluster.protocol.DataFlow

public class StandardDataFlow extends Object implements Serializable, org.apache.nifi.cluster.protocol.DataFlow
Represents a dataflow, which includes the raw bytes of the flow.xml and whether processors should be started automatically at application startup.
See Also:
  • Field Details

    • logger

      private static final org.slf4j.Logger logger
    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • flow

      private final byte[] flow
    • snippetBytes

      private final byte[] snippetBytes
    • authorizerFingerprint

      private final byte[] authorizerFingerprint
    • missingComponentIds

      private final Set<String> missingComponentIds
    • flowDocument

      private Document flowDocument
    • versionedDataflow

      private org.apache.nifi.controller.flow.VersionedDataflow versionedDataflow
  • Constructor Details

    • StandardDataFlow

      public StandardDataFlow(byte[] flow, byte[] snippetBytes, byte[] authorizerFingerprint, Set<String> missingComponentIds)
      Constructs an instance.
      Parameters:
      flow - a valid flow as bytes, which cannot be null
      snippetBytes - a JSON representation of snippets. May be null.
      authorizerFingerprint - the bytes of the Authorizer's fingerprint. May be null when using an external Authorizer.
      missingComponentIds - the ids of components that were created as missing ghost components
      Throws:
      NullPointerException - if flow is null
    • StandardDataFlow

      public StandardDataFlow(org.apache.nifi.cluster.protocol.DataFlow toCopy)
  • Method Details

    • copy

      private static byte[] copy(byte[] bytes)
    • getFlow

      public byte[] getFlow()
      Specified by:
      getFlow in interface org.apache.nifi.cluster.protocol.DataFlow
    • getFlowDocument

      public Document getFlowDocument()
      Specified by:
      getFlowDocument in interface org.apache.nifi.cluster.protocol.DataFlow
    • getVersionedDataflow

      public org.apache.nifi.controller.flow.VersionedDataflow getVersionedDataflow()
      Specified by:
      getVersionedDataflow in interface org.apache.nifi.cluster.protocol.DataFlow
    • getSnippets

      public byte[] getSnippets()
      Specified by:
      getSnippets in interface org.apache.nifi.cluster.protocol.DataFlow
    • getAuthorizerFingerprint

      public byte[] getAuthorizerFingerprint()
      Specified by:
      getAuthorizerFingerprint in interface org.apache.nifi.cluster.protocol.DataFlow
    • getMissingComponents

      public Set<String> getMissingComponents()
      Specified by:
      getMissingComponents in interface org.apache.nifi.cluster.protocol.DataFlow
    • parseFlowBytes

      private static Document parseFlowBytes(byte[] flow) throws org.apache.nifi.controller.serialization.FlowSerializationException
      Throws:
      org.apache.nifi.controller.serialization.FlowSerializationException
    • parseVersionedDataflow

      private org.apache.nifi.controller.flow.VersionedDataflow parseVersionedDataflow(byte[] flow)