-
- All Superinterfaces:
LogicalGraphInstanceView
public interface LogicalGraphInstance extends LogicalGraphInstanceView
The executable artifact of a logical graph. Contains the compiled execution plan. This is produced as the result of either compiling or executing aLogicalGraph
in a specified execution environment. ALogicalGraphInstance
is the central point of management for the execution of a logical graph. It:- manages the execution of the underlying plan network
- describes the structure of the instantiated logical graph
- contains the results - in the form of errors and statistics - of the execution of the graph
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
abort()
Cancels any executing processes.OperatorInstance
getOperatorInstance(LogicalOperator operator)
Looks up an operator instance by theLogicalOperator
added to the graph.InputPortInstance
getPortInstance(LogicalPort inputPort)
Looks up an operator instance by the input port of aLogicalOperator
that was added to the graph.void
join()
Waits for an already executing graph instance to terminate.void
run()
Executes the graph instance synchronously.void
start()
Executes the graph instance in the background Control is immediately returned to the caller.-
Methods inherited from interface com.pervasive.datarush.graphs.LogicalGraphInstanceView
getChildren, getGraphInstanceGUID, getName, getPath, getSnapshot, getState
-
-
-
-
Method Detail
-
run
void run()
Executes the graph instance synchronously. The caller will block until the graph terminates. On return, the instance will be in acomplete
state.This is similar to calling
start()
, thenjoin()
.- Throws:
DROperatorException
- if errors occur during execution of the graphGraphCancellationException
- if the graph is canceled usingabort()
or if the calling thread is is interrupted while blocked. If the caller should handle its own interruptions, usestart()
andjoin()
instead.IllegalStateException
- if the instance has already been executed or canceled.
-
start
void start()
Executes the graph instance in the background Control is immediately returned to the caller. On return, the instance will beEXECUTING
.- Throws:
IllegalStateException
- if the instance has already been executed or canceled.
-
abort
void abort()
Cancels any executing processes. If the instance is alreadycomplete
, the request is ignored.
-
join
void join() throws InterruptedException
Waits for an already executing graph instance to terminate. On return, the instance will becomplete
.- Throws:
InterruptedException
- if the wait is interruptedDROperatorException
- if errors occurred during execution of the process network.GraphCancellationException
- if the graph was canceled usingabort()
.
-
getOperatorInstance
OperatorInstance getOperatorInstance(LogicalOperator operator)
Looks up an operator instance by theLogicalOperator
added to the graph.- Parameters:
operator
- must be an operator that was added to the graph- Returns:
- the associated operator instance or
null
if not found.
-
getPortInstance
InputPortInstance getPortInstance(LogicalPort inputPort)
Looks up an operator instance by the input port of aLogicalOperator
that was added to the graph.- Parameters:
inputPort
- must be an input port of aLogicalOperator
- Returns:
- the associated port instance or
null
if not found.
-
-