public class Program extends Object implements Cloneable, Statement.Labeled
ProgramInstruction
. Certain
ProgramInstructions, such as IfInstruction
and WhileInstruction
may
have pointers to sub programs.Constructor and Description |
---|
Program(boolean atomic)
Constructor for Program.
|
Modifier and Type | Method and Description |
---|---|
void |
addInstruction(ProgramInstruction instruction) |
void |
addInstructions(Program instructions) |
Program |
clone()
Produces a deep clone.
|
void |
decrementProgramCounter()
Decrements the program counter, so that the next call to
getCurrentInstruction() will return the previous
instruction. |
ProgramInstruction |
getCurrentInstruction()
Returns the next instruction to be executed, or null if there are
none or no more instructions.
|
PlanNode |
getDescriptionProperties() |
String |
getExceptionGroup() |
Program |
getExceptionProgram() |
ProgramInstruction |
getInstructionAt(int instructionIndex)
Returns the instruction to be executed at the indicated index,
or null if there is no instruction at that index.
|
String |
getLabel() |
List<ProgramInstruction> |
getProcessorInstructions() |
TempTableStore |
getTempTableStore() |
void |
incrementProgramCounter()
Increments the program counter, so that the next call to
getCurrentInstruction() will return the following
instruction. |
Boolean |
instructionsRequireTransaction(boolean transactionalReads) |
boolean |
isAtomic() |
boolean |
isTrappingExceptions() |
Boolean |
requiresTransaction(boolean transactionalReads) |
void |
reset(String sessionId)
Resets this program, so it can be run through again.
|
void |
setExceptionGroup(String exceptionGroup) |
void |
setExceptionProgram(Program exceptionBlock) |
void |
setLabel(String label) |
void |
setStartedTxn(boolean startedTxn) |
void |
setTrappingExceptions(boolean trappingExceptions) |
boolean |
startedTxn() |
String |
toString() |
public void setStartedTxn(boolean startedTxn)
public boolean startedTxn()
public String getLabel()
getLabel
in interface Statement.Labeled
public void setLabel(String label)
setLabel
in interface Statement.Labeled
public boolean isAtomic()
public TempTableStore getTempTableStore()
public ProgramInstruction getCurrentInstruction()
public void incrementProgramCounter()
getCurrentInstruction()
will return the following
instruction. This method is intended to be used by a
ProcessingInstruction itself, to control the flow of execution.public void decrementProgramCounter()
getCurrentInstruction()
will return the previous
instruction. This method is intended to be used by a
ProcessingInstruction itself, to control the flow of execution.public void reset(String sessionId)
public ProgramInstruction getInstructionAt(int instructionIndex)
public void addInstruction(ProgramInstruction instruction)
public void addInstructions(Program instructions)
public PlanNode getDescriptionProperties()
public List<ProgramInstruction> getProcessorInstructions()
public void setExceptionGroup(String exceptionGroup)
public void setExceptionProgram(Program exceptionBlock)
public String getExceptionGroup()
public Program getExceptionProgram()
public boolean isTrappingExceptions()
public void setTrappingExceptions(boolean trappingExceptions)
public Boolean requiresTransaction(boolean transactionalReads)
public Boolean instructionsRequireTransaction(boolean transactionalReads)
Copyright © 2019. All rights reserved.