Package edu.tufts.hrilab.action.recovery
Class PolicyConstraints
java.lang.Object
edu.tufts.hrilab.action.recovery.PolicyConstraints
Constraints that define when a RecoveryPolicy is applicable.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe corresponding recovery policy is applicable to these action statuses.(Action Recovery Only) The corresponding recovery policy will defer matching to failure reasons until/unless the failure propagates to an action context whose signature matches one of the entries in this field.The corresponding recovery policy is NOT applicable to these failed actions.The corresponding recovery policy is NOT applicable to these failure reasons.The corresponding recovery policy is NOT applicable to these goals.The corresponding recovery policy is applicable to these failed actions.The corresponding recovery policy is applicable to these failure reasons.The corresponding recovery policy is applicable to these goals.intMaximum number of times this recovery policy can be executed for the same failure reasons under the same context ActionRecovery RETRY: Attempt count resets when the reattempted action succeeds GaolRecovery: Attempt count always increments and never resets.The DBEntry method name containing the recovery policy specification.(Action Recovery Only) Indication of how to continue with execution after a recovery policy has successfully completed.Type of recovery policy - one of Action or Goal. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the corresponding recovery policy is always applicable (i.e., empty recovery ASL block).booleaninthashCode()
-
Field Details
-
methodName
The DBEntry method name containing the recovery policy specification. -
recoveryType
Type of recovery policy - one of Action or Goal. The corresponding recovery policy can be caught in and applied under contexts of this type. Single exception is root goals which are direct action instructions. -
goals
The corresponding recovery policy is applicable to these goals. Can be empty (i.e., applies to all goals). Cannot be used at the same time as excludedGoals. -
excludedGoals
The corresponding recovery policy is NOT applicable to these goals. Can be empty (i.e., applies to all goals). Cannot be used at the same time as goals. -
failedActions
The corresponding recovery policy is applicable to these failed actions. Can be empty (i.e., applies to all failed actions). Cannot be used at the same time as excludedFailedActions. -
excludedFailedActions
The corresponding recovery policy is NOT applicable to these failed actions. Can be empty (i.e., applies to all failed actions). Cannot be used at the same time as failedActions. -
failureReasons
The corresponding recovery policy is applicable to these failure reasons. Can be empty (i.e., applies to all failure reasons). Cannot be used at the same time as excludedFailureReasons. If an action failure has more than one failure reason, a single policy must handle all the failure reasons. -
excludedFailureReasons
The corresponding recovery policy is NOT applicable to these failure reasons. Can be empty (i.e., applies to all failure reasons). Cannot be used at the same time as failureReasons. -
actionStatuses
The corresponding recovery policy is applicable to these action statuses. Can be empty (i.e., applies to all action statuses). -
postRecoveryExecutionType
(Action Recovery Only) Indication of how to continue with execution after a recovery policy has successfully completed. See PostRecoveryExecutionType for details. -
catchingActions
(Action Recovery Only) The corresponding recovery policy will defer matching to failure reasons until/unless the failure propagates to an action context whose signature matches one of the entries in this field. Can be empty (i.e. applies to the direct parent of the failed context regardless of signature) -
maximumAttempts
public int maximumAttemptsMaximum number of times this recovery policy can be executed for the same failure reasons under the same context ActionRecovery RETRY: Attempt count resets when the reattempted action succeeds GaolRecovery: Attempt count always increments and never resets. TODO if also want to check for progress (see notes in Recovery.java)
-
-
Constructor Details
-
PolicyConstraints
public PolicyConstraints()
-
-
Method Details