-
- 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 aLogicalGraphin a specified execution environment. ALogicalGraphInstanceis 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 voidabort()Cancels any executing processes.OperatorInstancegetOperatorInstance(LogicalOperator operator)Looks up an operator instance by theLogicalOperatoradded to the graph.InputPortInstancegetPortInstance(LogicalPort inputPort)Looks up an operator instance by the input port of aLogicalOperatorthat was added to the graph.voidjoin()Waits for an already executing graph instance to terminate.voidrun()Executes the graph instance synchronously.voidstart()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 acompletestate.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 theLogicalOperatoradded to the graph.- Parameters:
operator- must be an operator that was added to the graph- Returns:
- the associated operator instance or
nullif not found.
-
getPortInstance
InputPortInstance getPortInstance(LogicalPort inputPort)
Looks up an operator instance by the input port of aLogicalOperatorthat was added to the graph.- Parameters:
inputPort- must be an input port of aLogicalOperator- Returns:
- the associated port instance or
nullif not found.
-
-