public class OperatorSubPlan extends java.lang.Object implements OperatorPlan
| Constructor and Description | 
|---|
| OperatorSubPlan(OperatorPlan base) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | add(Operator op)Add a new operator to the plan. | 
| void | connect(Operator from,
       int fromPos,
       Operator to,
       int toPos)Connect two operators in the plan, controlling which position in the
 edge lists that the from and to edges are placed. | 
| void | connect(Operator from,
       Operator to)Connect two operators in the plan. | 
| void | createSoftLink(Operator from,
              Operator to)Create an soft edge between two nodes. | 
| Pair<java.lang.Integer,java.lang.Integer> | disconnect(Operator from,
          Operator to)Disconnect two operators in the plan. | 
| OperatorPlan | getBasePlan() | 
| java.util.Iterator<Operator> | getOperators()Get an iterator of all operators in this plan | 
| java.util.List<Operator> | getPredecessors(Operator op)For a given operator, get all operators immediately before it in the
 plan. | 
| java.util.List<Operator> | getSinks()Get all operators in the plan that have no successors. | 
| java.util.List<Operator> | getSoftLinkPredecessors(Operator op)For a given operator, get all operators softly immediately before it in the
 plan. | 
| java.util.List<Operator> | getSoftLinkSuccessors(Operator op)For a given operator, get all operators softly immediately after it. | 
| java.util.List<Operator> | getSources()Get all operators in the plan that have no predecessors. | 
| java.util.List<Operator> | getSuccessors(Operator op)For a given operator, get all operators immediately after it. | 
| void | insertBetween(Operator pred,
             Operator operatorToInsert,
             Operator succ)This method insert node operatorToInsert between pred and succ. | 
| boolean | isEqual(OperatorPlan other)This is like a shallow comparison. | 
| boolean | pathExists(Operator from,
          Operator to)check if there is a path in the plan graph between the load operator to the store operator. | 
| void | remove(Operator op)Remove an operator from the plan. | 
| void | removeAndReconnect(Operator operatorToRemove)This method remove a node operatorToRemove. | 
| void | removeSoftLink(Operator from,
              Operator to)Remove an soft edge | 
| void | replace(Operator oldOperator,
       Operator newOperator)This method replace the oldOperator with the newOperator, make all connection
 to the new operator in the place of old operator | 
| int | size()Get number of nodes in the plan. | 
public OperatorSubPlan(OperatorPlan base)
public OperatorPlan getBasePlan()
public void add(Operator op)
OperatorPlanadd in interface OperatorPlanop - operator to addpublic void connect(Operator from, int fromPos, Operator to, int toPos)
OperatorPlanconnect in interface OperatorPlanfrom - Operator edge will come fromfromPos - Position in the array for the from edgeto - Operator edge will go totoPos - Position in the array for the to edgepublic void connect(Operator from, Operator to)
OperatorPlanconnect in interface OperatorPlanfrom - Operator edge will come fromto - Operator edge will go topublic Pair<java.lang.Integer,java.lang.Integer> disconnect(Operator from, Operator to) throws FrontendException
OperatorPlandisconnect in interface OperatorPlanfrom - Operator edge is coming fromto - Operator edge is going toFrontendException - if the two operators aren't connected.public java.util.List<Operator> getSinks()
OperatorPlangetSinks in interface OperatorPlanpublic java.util.Iterator<Operator> getOperators()
OperatorPlangetOperators in interface OperatorPlanpublic java.util.List<Operator> getPredecessors(Operator op)
OperatorPlangetPredecessors in interface OperatorPlanop - operator to fetch predecessors ofpublic java.util.List<Operator> getSources()
OperatorPlangetSources in interface OperatorPlanpublic java.util.List<Operator> getSuccessors(Operator op)
OperatorPlangetSuccessors in interface OperatorPlanop - operator to fetch successors ofpublic void remove(Operator op) throws FrontendException
OperatorPlanremove in interface OperatorPlanop - Operator to be removedFrontendException - if the remove operation attempts to 
 remove an operator that is still connected to other operators.public int size()
OperatorPlansize in interface OperatorPlanpublic boolean isEqual(OperatorPlan other) throws FrontendException
OperatorPlanisEqual in interface OperatorPlanother - object to compareFrontendExceptionpublic void createSoftLink(Operator from, Operator to)
OperatorPlancreateSoftLink in interface OperatorPlanfrom - Operator dependent uponto - Operator having the dependencypublic void removeSoftLink(Operator from, Operator to)
OperatorPlanremoveSoftLink in interface OperatorPlanfrom - Operator dependent uponto - Operator having the dependencypublic java.util.List<Operator> getSoftLinkPredecessors(Operator op)
OperatorPlangetSoftLinkPredecessors in interface OperatorPlanop - operator to fetch predecessors ofpublic java.util.List<Operator> getSoftLinkSuccessors(Operator op)
OperatorPlangetSoftLinkSuccessors in interface OperatorPlanop - operator to fetch successors ofpublic void insertBetween(Operator pred, Operator operatorToInsert, Operator succ) throws FrontendException
OperatorPlaninsertBetween in interface OperatorPlanpred - predecessor of inserted node after this methodoperatorToInsert - operato to insertsucc - successor of inserted node after this methodFrontendExceptionpublic void removeAndReconnect(Operator operatorToRemove) throws FrontendException
OperatorPlanremoveAndReconnect in interface OperatorPlanoperatorToRemove - operator to removeFrontendExceptionpublic void replace(Operator oldOperator, Operator newOperator) throws FrontendException
OperatorPlanreplace in interface OperatorPlanoldOperator - operator to be replacednewOperator - operator to replaceFrontendExceptionpublic boolean pathExists(Operator from, Operator to)
OperatorPlanpathExists in interface OperatorPlanfrom - load operatorto - store operatorCopyright © 2007-2012 The Apache Software Foundation