@ControlBoundary public interface Dataflow extends Annotated<Dataflow>, TokenProcessingEntity, WorkflowItem
Modifier and Type | Method and Description |
---|---|
DataflowValidationReport |
checkValidity()
Triggers a check for various basic potential problems with the workflow,
in particular ones related to type checking.
|
void |
fire(String owningProcess,
InvocationContext context)
A dataflow with no inputs cannot be driven by the supply of data tokens
as it has nowhere to receive such tokens.
|
<T extends NamedWorkflowEntity> |
getEntities(Class<T> entityType)
Get all workflow entities with the specified type restriction, this
allows retrieval of Processor, Merge, a mix of the two or any other
future entity to be added to the workflow model without a significant
change in this part of the API.
|
FailureTransmitter |
getFailureTransmitter()
The failure transmitter contains event listeners to be notified of
workflow level failures - these occur when an error bubbles up to the top
of the dispatch stack in a processor and is not handled by conversion to
an error token within the data stream.
|
String |
getIdentifier()
An identifier that is unique to this dataflow and its current state.
|
List<? extends DataflowInputPort> |
getInputPorts()
Dataflows have a list of input ports.
|
List<? extends Datalink> |
getLinks()
The dataflow is largely defined by the links between processors and other
entities within its scope.
|
List<? extends Merge> |
getMerges()
Dataflows also contain a set of merge operations, this method returns an
unmodifiable copy of the set.
|
List<? extends DataflowOutputPort> |
getOutputPorts()
Dataflows have a list of output ports.
|
List<? extends Processor> |
getProcessors()
A Dataflow consists of a set of named Processor instances.
|
boolean |
isInputPortConnected(DataflowInputPort inputPort)
Check if the given input port is connected to anything in the workflow.
|
String |
recordIdentifier() |
void |
setImmutable()
Mark this dataflow as immutable.
|
getAddAnnotationEdit, getAnnotations, getRemoveAnnotationEdit, setAnnotations
doTypeCheck
getLocalName
@HierarchyTraversal(hierarchies="workflowStructure", role=CHILD) List<? extends Processor> getProcessors()
@HierarchyTraversal(hierarchies="workflowStructure", role=CHILD) List<? extends Merge> getMerges()
@HierarchyTraversal(hierarchies="workflowStructure", role=CHILD) List<? extends DataflowInputPort> getInputPorts()
getInputPorts
in interface TokenProcessingEntity
<T extends NamedWorkflowEntity> List<? extends T> getEntities(Class<T> entityType)
entityType
- a class of the type specified by the type variable T. All
entities returned in the list can be cast to this type@HierarchyTraversal(hierarchies="workflowStructure", role=CHILD) List<? extends DataflowOutputPort> getOutputPorts()
getOutputPorts
in interface TokenProcessingEntity
@HierarchyTraversal(hierarchies="workflowStructure", role=CHILD) List<? extends Datalink> getLinks()
DataflowValidationReport checkValidity()
If the workflow has been set immutable with setImmutable()
,
subsequent calls to this method will return the cached
DataflowValidationReport.
void fire(String owningProcess, InvocationContext context)
FailureTransmitter getFailureTransmitter()
Listeners are messaged after all clean-up has been performed on the dataflow's internal state and that of any child operations within it, guaranteeing that no tokens will be generated with the id of the failed process after the message has been received by the listener
String getIdentifier()
String recordIdentifier()
boolean isInputPortConnected(DataflowInputPort inputPort)
inputPort
- void setImmutable()
fire(String, InvocationContext)
, in order to guarantee that
datalinks, port depths etc. don't change while the dataflow is running.Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.