|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgr.uoa.di.madgik.execution.plan.element.PlanElementBase
gr.uoa.di.madgik.execution.plan.element.BoundaryPlanElement
public class BoundaryPlanElement
This class represents a requirement that the subplan that is stored in the Root is to
be executed in a remote execution container. The access info for this remote container is stored in
Config. Additionally to the subplan moved to the remote host along with the
subset of the variables as defined by GetNeededVariableNames(), the local files included
in the Attachments set are also moved using the same connection. The execution in the
remote container can be isolated so as any byproducts of the execution do not overlap with other executions
that take place in parallel. Files that should be cleaned up after execution can also be declared. This
element also supports contingency triggers of IContingencyReaction.ReactionType#Pick so that in case
of error a different execution container can be picked and the execution restarted there. After the execution
in the remote execution container is finished, the variables that are modified by the subplan are send back to
the caller and are used to update the local variables copy as defined by
GetModifiedVariableNames(). If the execution terminated with an error, the error is
retrieved and re-thrown.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class gr.uoa.di.madgik.execution.plan.element.PlanElementBase |
|---|
PlanElementBase.ClockType |
| Nested classes/interfaces inherited from interface gr.uoa.di.madgik.execution.plan.element.IPlanElement |
|---|
IPlanElement.PlanElementType |
| Field Summary | |
|---|---|
Set<ExecutionAttachment> |
Attachments
The Attachments that are to be moved to the remote execution container directly though the connection established with the remote container |
List<String> |
CleanUpLocalFiles
A list of files that will be present in the remote execution container and which after the execution should be cleaned up |
BoundaryConfig |
Config
The remote execution container access configuration |
BoundaryIsolationInfo |
Isolation
The remote execution container can be isolated to a sub-directory temporarily created for this execution purposes so that files created during this execution do not overlap with other executions taking place in parallel. |
IPlanElement |
Root
The Root of the sub plan that is to be executed to the remote execution container. |
List<ContingencyTrigger> |
Triggers
The contingency Triggers that can be applied to this element in case of an error |
| Constructor Summary | |
|---|---|
BoundaryPlanElement()
|
|
| Method Summary | |
|---|---|
void |
ExecuteExtender(ExecutionHandle Handle)
Execute extender. |
void |
FromXML(Element XML)
Populate the element from its xml serialization as returned by IPlanElement.ToXML() |
void |
FromXML(String XML)
Populate the element from its xml serialization as returned by IPlanElement.ToXML() |
List<ContingencyTrigger> |
GetContingencyTriggers()
Gets the contingency triggers. |
Logger |
GetExtenderLogger()
Gets the extender logger. |
String |
GetID()
Gets the id. |
Set<String> |
GetModifiedVariableNames()
Gets the modified variable names of the element and of the elements contained. |
String |
GetName()
Gets the name. |
Set<String> |
GetNeededVariableNames()
Gets the needed variable names of the element and of the elements contained. |
IPlanElement.PlanElementType |
GetPlanElementType()
Gets the plan element type. |
IPlanElement |
Locate(String ID)
Locate the plan element with the provided id. |
Set<IPlanElement> |
LocateActionElements()
Retrieves the Action elements under this elements |
void |
SetContingencyResourcePick(ExecutionHandle Handle,
String Pick)
Sets the picked resource in case the IContingencyReaction.ReactionType#Pick reaction is supported |
void |
SetName(String Name)
Sets the name. |
IContingencyReaction.ReactionType[] |
SupportedContingencyTriggers()
Retrieves the supported contingency triggers. |
boolean |
SupportsContingencyTriggers()
Checks if the element supports contingency triggers. |
String |
ToXML()
Serialize to xml the element and all its contained elements |
void |
Validate()
Validate the element and any sub element it contains |
void |
ValidatePreExecution(ExecutionHandle Handle)
Validate the element and any sub element it contains before it is executed |
| Methods inherited from class gr.uoa.di.madgik.execution.plan.element.PlanElementBase |
|---|
CheckStatus, Execute, ExecuteWithStateAwareness, GetPerformanceEvent, RegisterToRunningActionElementsRestriction, ResetClocks, StartClock, StopClock, UnregisterToRunningActionElementsRestriction, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public IPlanElement Root
public List<ContingencyTrigger> Triggers
public BoundaryConfig Config
public BoundaryIsolationInfo Isolation
public List<String> CleanUpLocalFiles
public Set<ExecutionAttachment> Attachments
| Constructor Detail |
|---|
public BoundaryPlanElement()
| Method Detail |
|---|
public void FromXML(String XML)
throws ExecutionSerializationException
IPlanElementIPlanElement.ToXML()
XML - the xML serialization
ExecutionSerializationException - A serialization error occurred
public void FromXML(Element XML)
throws ExecutionSerializationException
IPlanElementIPlanElement.ToXML()
XML - the xML serialization
ExecutionSerializationException - A serialization error occurredpublic String GetID()
IPlanElement
public String GetName()
IPlanElement
public IPlanElement.PlanElementType GetPlanElementType()
IPlanElement
public IPlanElement Locate(String ID)
IPlanElement
ID - the iD
public Set<IPlanElement> LocateActionElements()
IPlanElement
public void SetName(String Name)
IPlanElement
Name - the name
public String ToXML()
throws ExecutionSerializationException
IPlanElement
ExecutionSerializationException - A serialization error occurred
public void Validate()
throws ExecutionValidationException
IPlanElement
ExecutionValidationException - A validation error occurred
public void ValidatePreExecution(ExecutionHandle Handle)
throws ExecutionValidationException
IPlanElement
Handle - the execution handle
ExecutionValidationException - A validation error occurredpublic IContingencyReaction.ReactionType[] SupportedContingencyTriggers()
IPlanElement
public boolean SupportsContingencyTriggers()
IPlanElement
public List<ContingencyTrigger> GetContingencyTriggers()
IPlanElement
public void SetContingencyResourcePick(ExecutionHandle Handle,
String Pick)
throws ExecutionRunTimeException
IPlanElementIContingencyReaction.ReactionType#Pick reaction is supported
Handle - the execution handle handlePick - the picked resource
ExecutionRunTimeException - A runtime error occurredpublic Set<String> GetNeededVariableNames()
IPlanElement
public Set<String> GetModifiedVariableNames()
IPlanElement
public Logger GetExtenderLogger()
PlanElementBase
GetExtenderLogger in class PlanElementBase
public void ExecuteExtender(ExecutionHandle Handle)
throws ExecutionRunTimeException,
ExecutionCancelException,
ExecutionInternalErrorException,
ExecutionBreakException
PlanElementBase
ExecuteExtender in class PlanElementBaseHandle - the execution handle
ExecutionRunTimeException - A runtime error occurred
ExecutionCancelException - The execution was canceled
ExecutionInternalErrorException - An internal error occurred
ExecutionBreakException - The execution was terminated
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||