@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-25T18:29:04.077Z") public abstract class TaskStateBase extends State implements INextable
Reaching a Task state causes some work to be executed, represented by the Task's resource property. Task constructs represent a generic Amazon States Language Task.
For some resource types, more specific subclasses of Task may be available which are more convenient to use.
INextable.Jsii$Default
IChainable.Jsii$Default
IConstruct.Jsii$Default
Modifier | Constructor and Description |
---|---|
protected |
TaskStateBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
TaskStateBase(software.amazon.jsii.JsiiObjectRef objRef) |
protected |
TaskStateBase(software.constructs.Construct scope,
java.lang.String id,
TaskStateBaseProps props) |
Modifier and Type | Method and Description |
---|---|
TaskStateBase |
addCatch(IChainable handler)
Add a recovery handler for this state.
|
TaskStateBase |
addCatch(IChainable handler,
CatchProps props)
Add a recovery handler for this state.
|
TaskStateBase |
addRetry()
Add retry configuration for this state.
|
TaskStateBase |
addRetry(RetryProps props)
Add retry configuration for this state.
|
java.util.List<INextable> |
getEndStates()
Continuable states of this Chainable.
|
protected abstract TaskMetricsConfig |
getTaskMetrics() |
protected abstract java.util.List<PolicyStatement> |
getTaskPolicies() |
Metric |
metric(java.lang.String metricName)
Return the given named metric for this Task.
|
Metric |
metric(java.lang.String metricName,
MetricOptions props)
Return the given named metric for this Task.
|
Metric |
metricFailed()
Metric for the number of times this activity fails.
|
Metric |
metricFailed(MetricOptions props)
Metric for the number of times this activity fails.
|
Metric |
metricHeartbeatTimedOut()
Metric for the number of times the heartbeat times out for this activity.
|
Metric |
metricHeartbeatTimedOut(MetricOptions props)
Metric for the number of times the heartbeat times out for this activity.
|
Metric |
metricRunTime()
The interval, in milliseconds, between the time the Task starts and the time it closes.
|
Metric |
metricRunTime(MetricOptions props)
The interval, in milliseconds, between the time the Task starts and the time it closes.
|
Metric |
metricScheduled()
Metric for the number of times this activity is scheduled.
|
Metric |
metricScheduled(MetricOptions props)
Metric for the number of times this activity is scheduled.
|
Metric |
metricScheduleTime()
The interval, in milliseconds, for which the activity stays in the schedule state.
|
Metric |
metricScheduleTime(MetricOptions props)
The interval, in milliseconds, for which the activity stays in the schedule state.
|
Metric |
metricStarted()
Metric for the number of times this activity is started.
|
Metric |
metricStarted(MetricOptions props)
Metric for the number of times this activity is started.
|
Metric |
metricSucceeded()
Metric for the number of times this activity succeeds.
|
Metric |
metricSucceeded(MetricOptions props)
Metric for the number of times this activity succeeds.
|
Metric |
metricTime()
The interval, in milliseconds, between the time the activity is scheduled and the time it closes.
|
Metric |
metricTime(MetricOptions props)
The interval, in milliseconds, between the time the activity is scheduled and the time it closes.
|
Metric |
metricTimedOut()
Metric for the number of times this activity times out.
|
Metric |
metricTimedOut(MetricOptions props)
Metric for the number of times this activity times out.
|
Chain |
next(IChainable next)
Continue normal execution with the given state.
|
com.fasterxml.jackson.databind.node.ObjectNode |
toStateJson()
Return the Amazon States Language object for this state.
|
protected void |
whenBoundToGraph(StateGraph graph)
Called whenever this state is bound to a graph.
|
addBranch, addChoice, addIterator, addPrefix, bindToGraph, filterNextables, findReachableEndStates, findReachableEndStates, findReachableStates, findReachableStates, getBranches, getComment, getDefaultChoice, getId, getInputPath, getIteration, getOutputPath, getParameters, getResultPath, getResultSelector, getStartState, getStateId, makeDefault, makeNext, prefixStates, renderBranches, renderChoices, renderInputOutput, renderIterator, renderNextEnd, renderResultSelector, renderRetryCatch, setDefaultChoice, setIteration
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
protected TaskStateBase(software.amazon.jsii.JsiiObjectRef objRef)
protected TaskStateBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
protected TaskStateBase(software.constructs.Construct scope, java.lang.String id, TaskStateBaseProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public TaskStateBase addCatch(IChainable handler, CatchProps props)
When a particular error occurs, execution will continue at the error handler instead of failing the state machine execution.
handler
- This parameter is required.props
- public TaskStateBase addCatch(IChainable handler)
When a particular error occurs, execution will continue at the error handler instead of failing the state machine execution.
handler
- This parameter is required.public TaskStateBase addRetry(RetryProps props)
This controls if and how the execution will be retried if a particular error occurs.
props
- public TaskStateBase addRetry()
This controls if and how the execution will be retried if a particular error occurs.
public Metric metric(java.lang.String metricName, MetricOptions props)
Default: - sum over 5 minutes
metricName
- This parameter is required.props
- public Metric metric(java.lang.String metricName)
Default: - sum over 5 minutes
metricName
- This parameter is required.public Metric metricFailed(MetricOptions props)
Default: - sum over 5 minutes
props
- public Metric metricFailed()
Default: - sum over 5 minutes
public Metric metricHeartbeatTimedOut(MetricOptions props)
Default: - sum over 5 minutes
props
- public Metric metricHeartbeatTimedOut()
Default: - sum over 5 minutes
public Metric metricRunTime(MetricOptions props)
Default: - average over 5 minutes
props
- public Metric metricRunTime()
Default: - average over 5 minutes
public Metric metricScheduled(MetricOptions props)
Default: - sum over 5 minutes
props
- public Metric metricScheduled()
Default: - sum over 5 minutes
public Metric metricScheduleTime(MetricOptions props)
Default: - average over 5 minutes
props
- public Metric metricScheduleTime()
Default: - average over 5 minutes
public Metric metricStarted(MetricOptions props)
Default: - sum over 5 minutes
props
- public Metric metricStarted()
Default: - sum over 5 minutes
public Metric metricSucceeded(MetricOptions props)
Default: - sum over 5 minutes
props
- public Metric metricSucceeded()
Default: - sum over 5 minutes
public Metric metricTime(MetricOptions props)
Default: - average over 5 minutes
props
- public Metric metricTime()
Default: - average over 5 minutes
public Metric metricTimedOut(MetricOptions props)
Default: - sum over 5 minutes
props
- public Metric metricTimedOut()
Default: - sum over 5 minutes
public Chain next(IChainable next)
public com.fasterxml.jackson.databind.node.ObjectNode toStateJson()
toStateJson
in class State
protected void whenBoundToGraph(StateGraph graph)
Can be overridden by subclasses.
whenBoundToGraph
in class State
graph
- This parameter is required.public java.util.List<INextable> getEndStates()
getEndStates
in interface IChainable
getEndStates
in class State
protected abstract TaskMetricsConfig getTaskMetrics()
protected abstract java.util.List<PolicyStatement> getTaskPolicies()