Interface NexusClientCallsInterceptor
- All Known Implementing Classes:
NexusClientCallsInterceptorBase,RootNexusClientInvoker
Per-call interceptor for
NexusClient and NexusOperationHandle operations on
standalone Nexus operation executions.
Implementations are produced by NexusClientInterceptor.nexusClientCallsInterceptor(NexusClientCallsInterceptor) during NexusClient construction. Prefer extending NexusClientCallsInterceptorBase and
overriding only the methods you need.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classResult of a list call.static final classstatic final classstatic final classstatic final classstatic final classstatic final class -
Method Summary
Modifier and TypeMethodDescriptionReturns the count of standalone Nexus operation executions matching a Visibility query, optionally grouped by attribute.Deletes a closed standalone Nexus operation execution from the server's visibility store.describeNexusOperationExecution(NexusClientCallsInterceptor.DescribeNexusOperationExecutionInput input) Returns a point-in-time snapshot of a standalone Nexus operation execution.Synchronously waits for a standalone Nexus operation to complete and returns the deserialized result.Asynchronous variant ofgetNexusOperationResult(io.temporal.common.interceptors.NexusClientCallsInterceptor.GetNexusOperationResultInput<R>)that returns a future without blocking the calling thread.Lists standalone Nexus operation executions matching a Visibility query.requestCancelNexusOperationExecution(NexusClientCallsInterceptor.RequestCancelNexusOperationExecutionInput input) Requests cancellation of a running standalone Nexus operation.Starts a standalone Nexus operation.terminateNexusOperationExecution(NexusClientCallsInterceptor.TerminateNexusOperationExecutionInput input) Forcefully terminates a standalone Nexus operation.
-
Method Details
-
startNexusOperationExecution
NexusClientCallsInterceptor.StartNexusOperationExecutionOutput startNexusOperationExecution(NexusClientCallsInterceptor.StartNexusOperationExecutionInput input) Starts a standalone Nexus operation. The endpoint, service, operation name, input, and scheduling options are carried ininput.- Parameters:
input- endpoint, service name, operation name, encoded input, and start options- Returns:
- output containing the operation ID, server-assigned run ID, and whether the operation was started by this call (vs. de-duplicated to an existing one)
-
describeNexusOperationExecution
NexusClientCallsInterceptor.DescribeNexusOperationExecutionOutput describeNexusOperationExecution(NexusClientCallsInterceptor.DescribeNexusOperationExecutionInput input) Returns a point-in-time snapshot of a standalone Nexus operation execution.- Parameters:
input- operation ID and optional run ID- Returns:
- output wrapping the
NexusOperationExecutionDescription
-
getNexusOperationResult
<R> NexusClientCallsInterceptor.GetNexusOperationResultOutput<R> getNexusOperationResult(NexusClientCallsInterceptor.GetNexusOperationResultInput<R> input) throws TimeoutException Synchronously waits for a standalone Nexus operation to complete and returns the deserialized result. Implementations own the poll loop, deadline enforcement, andPayload→Rdeserialization. Blocks the calling thread for the duration.If you implement this method,
getNexusOperationResultAsync(io.temporal.common.interceptors.NexusClientCallsInterceptor.GetNexusOperationResultInput<R>)most likely needs to be implemented too.- Type Parameters:
R- the expected result type- Parameters:
input- operation ID, optional run ID, deadline, and the expected result class and type- Returns:
- output wrapping the deserialized result
- Throws:
NexusOperationFailedException- if the operation completed with a failureTimeoutException- if the deadline expires before the operation completes- See Also:
-
getNexusOperationResultAsync
<R> CompletableFuture<NexusClientCallsInterceptor.GetNexusOperationResultOutput<R>> getNexusOperationResultAsync(NexusClientCallsInterceptor.GetNexusOperationResultInput<R> input) Asynchronous variant ofgetNexusOperationResult(io.temporal.common.interceptors.NexusClientCallsInterceptor.GetNexusOperationResultInput<R>)that returns a future without blocking the calling thread.If you implement this method,
getNexusOperationResult(io.temporal.common.interceptors.NexusClientCallsInterceptor.GetNexusOperationResultInput<R>)most likely needs to be implemented too.- Type Parameters:
R- the expected result type- Parameters:
input- operation ID, optional run ID, deadline, and the expected result class and type- Returns:
- a future that completes with the deserialized result, or completes exceptionally with
NexusOperationFailedExceptionon failure orTimeoutExceptionon deadline expiry - See Also:
-
listNexusOperationExecutions
NexusClientCallsInterceptor.ListNexusOperationExecutionsOutput listNexusOperationExecutions(NexusClientCallsInterceptor.ListNexusOperationExecutionsInput input) Lists standalone Nexus operation executions matching a Visibility query. The returned output contains a lazyStreamof deserializedNexusOperationExecutionMetadataobjects; pages are fetched on demand as the stream is consumed.- Parameters:
input- Visibility query string- Returns:
- output wrapping a lazy stream of matching operations
-
countNexusOperationExecutions
NexusClientCallsInterceptor.CountNexusOperationExecutionsOutput countNexusOperationExecutions(NexusClientCallsInterceptor.CountNexusOperationExecutionsInput input) Returns the count of standalone Nexus operation executions matching a Visibility query, optionally grouped by attribute.- Parameters:
input- Visibility query string- Returns:
- output wrapping the total count and any aggregation groups
-
requestCancelNexusOperationExecution
NexusClientCallsInterceptor.RequestCancelNexusOperationExecutionOutput requestCancelNexusOperationExecution(NexusClientCallsInterceptor.RequestCancelNexusOperationExecutionInput input) Requests cancellation of a running standalone Nexus operation. The server forwards the cancel request to the operation handler, which may honour or ignore it.- Parameters:
input- operation ID, optional run ID, and optional human-readable cancellation reason- Returns:
- an empty output that exists so the call can carry fields in the future
-
terminateNexusOperationExecution
NexusClientCallsInterceptor.TerminateNexusOperationExecutionOutput terminateNexusOperationExecution(NexusClientCallsInterceptor.TerminateNexusOperationExecutionInput input) Forcefully terminates a standalone Nexus operation. Unlike cancellation, termination is immediate and cannot be intercepted by the operation handler.- Parameters:
input- operation ID, optional run ID, and optional human-readable termination reason- Returns:
- an empty output that exists so the call can carry fields in the future
-
deleteNexusOperationExecution
NexusClientCallsInterceptor.DeleteNexusOperationExecutionOutput deleteNexusOperationExecution(NexusClientCallsInterceptor.DeleteNexusOperationExecutionInput input) Deletes a closed standalone Nexus operation execution from the server's visibility store. The operation must already be in a terminal state.- Parameters:
input- operation ID and optional run ID- Returns:
- an empty output that exists so the call can carry fields in the future
-