Interface ExecutableGraph<E extends ExecutableGraph<E>>
-
- All Known Subinterfaces:
- JavaTestableGraph
public interface ExecutableGraph<E extends ExecutableGraph<E>>
ExecutableGraph
represents an executable flow graph of Java primitive operators.- Since:
- InfoSphere® Streams Version 3.1
-
-
Method Summary
Methods Modifier and Type Method and Description java.util.concurrent.Future<E>
execute()
Execute the complete graph.E
executeToCompletion()
Execute this graph and wait for the completion of the graph.E
setTraceLevel(TraceLevel level)
Set the trace level for the executing graph.
-
-
-
Method Detail
-
execute
java.util.concurrent.Future<E> execute()
Execute the complete graph. The following tasks are performed for each operator in the graph:-
Calls the
context check methods
-
Calls the
Operator.initialize(OperatorContext)
method -
Calls the
Operator.allPortsReady()
method, which notifies the operator that the ports are ready and the operator can submit tuples.
The order for the method calls is not defined across the operators. However, theOperator.allPortsReady()
method is called for an operator only afterOperator.initialize(OperatorContext)
method is called for all the operators.
The graph runs until all the work has been completed by all the operators. A graph is completed when all the operators in the graph have been completed by terminating all the background threads and tasks. A graph is typically completed by source operators that submit
final punctuation marks
on all the output ports after those ports submit all of the tuples. When all work is completed, the operators areshutdown
and the returnedFuture
get()
method returnsthis
.
Some graphs might never complete and therefore run forever. Typically, this occurs for graphs with source operators that read live data sources that never end.
A call to the returnedFuture
cancel(true)
method initiates an asynchronous shutdown of the graph, thereby calling theOperator.shutdown()
method for all the operator invocations in the graph. The order for shutdowns is not defined across the operators.- Returns:
- this
-
Calls the
-
executeToCompletion
E executeToCompletion() throws java.lang.Exception
Execute this graph and wait for the completion of the graph. Once the graph completes it will be shutdown prior to this method returning.- Returns:
- this
- Throws:
java.lang.Exception
- Exception executing the graph.
-
setTraceLevel
E setTraceLevel(TraceLevel level)
Set the trace level for the executing graph. This will cause thetrace level change
notification to be issued.- Parameters:
level
- New trace level.- Returns:
- this
-
-