Class InternalNexusOperationContext
java.lang.Object
io.temporal.internal.nexus.InternalNexusOperationContext
-
Constructor Summary
ConstructorsConstructorDescriptionInternalNexusOperationContext(String namespace, String taskQueue, String endpoint, com.uber.m3.tally.Scope metricScope, WorkflowClient client) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResponseLink(io.temporal.api.common.v1.Link link) Append a response link returned by an outbound RPC the operation handler issued (e.g.voidClaims the invocation's single signal.voidclaimSignalWithStart(String workflowId) LikeclaimSignal(), but also rejects an empty workflow ID: it would be defaulted to a fresh UUID on each retried Nexus task, so the server could not dedupe and would start another workflow.voidMakes signals reusegetRequestId()and limits them to one; seeclaimSignal().com.uber.m3.tally.ScopeThe inbound Nexus task's request ID;nullif not set.List<io.temporal.api.common.v1.Link> Links from the inbound Nexus task; empty if none.List<io.temporal.api.common.v1.Link> Response links from every outbound RPC the handler issued.Serialization context for the operation this task is for, ornullif the service and operation are not known yet.The request ID signals must reuse;nulloutside a Temporal operation start.io.temporal.api.common.v1.LinkvoidFrees the signal claimed byclaimSignal()after the signal failed.voidSets metadata for the Temporal primitive backing the current Nexus operation.voidsetOutboundInterceptor(NexusOperationOutboundCallsInterceptor outboundCalls) voidsetRequestId(String requestId) Set the request ID of the inbound Nexus task, ambient for the whole invocation.voidsetRequestLinks(List<io.temporal.api.common.v1.Link> links) Set thecommon.v1.Links extracted from the inbound Nexus task so they can be attached to RPCs issued by the operation handler.voidsetSerializationContext(NexusSerializationContext serializationContext) Sets the serialization context describing the operation this task is for.voidsetStartWorkflowResponseLink(io.temporal.api.common.v1.Link link)
-
Constructor Details
-
InternalNexusOperationContext
public InternalNexusOperationContext(String namespace, String taskQueue, String endpoint, com.uber.m3.tally.Scope metricScope, WorkflowClient client)
-
-
Method Details
-
getMetricsScope
public com.uber.m3.tally.Scope getMetricsScope() -
getWorkflowClient
-
getTaskQueue
-
getNamespace
-
getEndpoint
-
setOutboundInterceptor
-
getUserFacingContext
-
setNexusOperationMetadata
Sets metadata for the Temporal primitive backing the current Nexus operation. -
getNexusOperationMetadata
-
setSerializationContext
Sets the serialization context describing the operation this task is for. Called by the task handler once the request variant has been inspected and the service and operation are known. -
getSerializationContext
Serialization context for the operation this task is for, ornullif the service and operation are not known yet. -
setRequestLinks
Set thecommon.v1.Links extracted from the inbound Nexus task so they can be attached to RPCs issued by the operation handler. -
getRequestLinks
Links from the inbound Nexus task; empty if none. -
setRequestId
Set the request ID of the inbound Nexus task, ambient for the whole invocation. -
getRequestId
The inbound Nexus task's request ID;nullif not set. -
enableSignalDeduplication
public void enableSignalDeduplication()Makes signals reusegetRequestId()and limits them to one; seeclaimSignal(). -
getSignalRequestId
The request ID signals must reuse;nulloutside a Temporal operation start. -
claimSignal
public void claimSignal()Claims the invocation's single signal. No-op unlessenableSignalDeduplication()was called. Callers mustreleaseSignal()if the signal fails, so the handler can send it again. -
claimSignalWithStart
LikeclaimSignal(), but also rejects an empty workflow ID: it would be defaulted to a fresh UUID on each retried Nexus task, so the server could not dedupe and would start another workflow. -
releaseSignal
public void releaseSignal()Frees the signal claimed byclaimSignal()after the signal failed. -
setStartWorkflowResponseLink
public void setStartWorkflowResponseLink(io.temporal.api.common.v1.Link link) -
getStartWorkflowResponseLink
public io.temporal.api.common.v1.Link getStartWorkflowResponseLink() -
addResponseLink
public void addResponseLink(io.temporal.api.common.v1.Link link) Append a response link returned by an outbound RPC the operation handler issued (e.g. signal, signalWithStart, etc). The task handler drains the list when building the operation's StartOperationResponse. -
getResponseLinks
Response links from every outbound RPC the handler issued. Returned as an unmodifiable view; callers must not attempt to mutate. Entries are accumulated while the operation handler runs (the call that flows throughNexusOperationInboundCallsInterceptor.startOperation(io.temporal.common.interceptors.NexusOperationInboundCallsInterceptor.StartOperationInput)) and are drained afterward by the task handler when building the StartOperationResponse.
-