Package io.temporal.activity
Interface ActivityInfo
-
public interface ActivityInfo
Information about the Activity Task that the current Activity Execution is handling. UseActivityExecutionContext.getInfo()
to access.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getActivityId()
ID of the Activity Execution.java.lang.String
getActivityNamespace()
java.lang.String
getActivityType()
int
getAttempt()
Gets the current Activity Execution attempt count.java.util.Optional<io.temporal.api.common.v1.Payloads>
getHeartbeatDetails()
java.time.Duration
getHeartbeatTimeout()
java.lang.String
getRunId()
long
getScheduledTimestamp()
Time when the Activity Execution was initially scheduled by the Workflow Execution.java.time.Duration
getScheduleToCloseTimeout()
java.time.Duration
getStartToCloseTimeout()
byte[]
getTaskToken()
java.lang.String
getWorkflowId()
java.lang.String
getWorkflowNamespace()
java.lang.String
getWorkflowType()
boolean
isLocal()
Used to determine if the Activity Execution is a local Activity.
-
-
-
Method Detail
-
getTaskToken
byte[] getTaskToken()
- Returns:
- a correlation token that can be used to complete the Activity Execution asynchronously
through
ActivityCompletionClient.complete(byte[], Object)
.
-
getWorkflowId
java.lang.String getWorkflowId()
- Returns:
- WorkflowId of the Workflow Execution that scheduled the Activity Execution.
-
getRunId
java.lang.String getRunId()
- Returns:
- RunId of the Workflow Execution that scheduled the Activity Execution.
-
getActivityId
java.lang.String getActivityId()
ID of the Activity Execution. This ID can be used to complete the Activity Execution asynchronously throughActivityCompletionClient.complete(String, Optional, String, Object)
.
-
getActivityType
java.lang.String getActivityType()
- Returns:
- type of the Activity.
-
getScheduledTimestamp
long getScheduledTimestamp()
Time when the Activity Execution was initially scheduled by the Workflow Execution.- Returns:
- Timestamp in milliseconds.
-
getScheduleToCloseTimeout
java.time.Duration getScheduleToCloseTimeout()
- Returns:
- the Schedule-To-Close Timeout setting as a Duration.
-
getStartToCloseTimeout
java.time.Duration getStartToCloseTimeout()
- Returns:
- the Start-To-Close Timeout setting as a Duration.
-
getHeartbeatTimeout
@Nonnull java.time.Duration getHeartbeatTimeout()
- Returns:
- the Heartbeat Timeout setting as a Duration.
Duration.ZERO
if absent
-
getHeartbeatDetails
java.util.Optional<io.temporal.api.common.v1.Payloads> getHeartbeatDetails()
-
getWorkflowType
java.lang.String getWorkflowType()
- Returns:
- the Workflow Type of the Workflow Execution that executed the Activity.
-
getWorkflowNamespace
java.lang.String getWorkflowNamespace()
- Returns:
- the Namespace of Workflow Execution that executed the Activity.
-
getActivityNamespace
java.lang.String getActivityNamespace()
- Returns:
- the Namespace of the Activity Execution.
-
getAttempt
int getAttempt()
Gets the current Activity Execution attempt count. Attempt counts start at 1 and increment on each Activity Task Execution retry.
-
isLocal
boolean isLocal()
Used to determine if the Activity Execution is a local Activity.
-
-