Package io.temporal.internal.client
Class LazyWorkflowUpdateHandleImpl<T>
- java.lang.Object
-
- io.temporal.internal.client.LazyWorkflowUpdateHandleImpl<T>
-
- All Implemented Interfaces:
WorkflowUpdateHandle<T>
public final class LazyWorkflowUpdateHandleImpl<T> extends java.lang.Object implements WorkflowUpdateHandle<T>
-
-
Constructor Summary
Constructors Constructor Description LazyWorkflowUpdateHandleImpl(WorkflowClientCallsInterceptor workflowClientInvoker, java.lang.String workflowType, java.lang.String updateName, java.lang.String id, io.temporal.api.common.v1.WorkflowExecution execution, java.lang.Class<T> resultClass, java.lang.reflect.Type resultType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.temporal.api.common.v1.WorkflowExecutiongetExecution()Gets the workflow execution this update request was sent to.java.lang.StringgetId()Gets the unique ID of this update.TgetResult()Returns the result of the workflow update.TgetResult(long timeout, java.util.concurrent.TimeUnit unit)Returns the result of the workflow update.java.util.concurrent.CompletableFuture<T>getResultAsync()Returns aCompletableFuturewith the update workflow execution request result, potentially waiting for the update to complete.java.util.concurrent.CompletableFuture<T>getResultAsync(long timeout, java.util.concurrent.TimeUnit unit)Returns aCompletableFuturewith the update workflow execution request result, potentially waiting for the update to complete.
-
-
-
Constructor Detail
-
LazyWorkflowUpdateHandleImpl
public LazyWorkflowUpdateHandleImpl(WorkflowClientCallsInterceptor workflowClientInvoker, java.lang.String workflowType, java.lang.String updateName, java.lang.String id, io.temporal.api.common.v1.WorkflowExecution execution, java.lang.Class<T> resultClass, java.lang.reflect.Type resultType)
-
-
Method Detail
-
getExecution
public io.temporal.api.common.v1.WorkflowExecution getExecution()
Description copied from interface:WorkflowUpdateHandleGets the workflow execution this update request was sent to.- Specified by:
getExecutionin interfaceWorkflowUpdateHandle<T>- Returns:
- the workflow execution this update was sent to.
-
getId
public java.lang.String getId()
Description copied from interface:WorkflowUpdateHandleGets the unique ID of this update.- Specified by:
getIdin interfaceWorkflowUpdateHandle<T>- Returns:
- the updates ID.
-
getResultAsync
public java.util.concurrent.CompletableFuture<T> getResultAsync(long timeout, java.util.concurrent.TimeUnit unit)
Description copied from interface:WorkflowUpdateHandleReturns aCompletableFuturewith the update workflow execution request result, potentially waiting for the update to complete.- Specified by:
getResultAsyncin interfaceWorkflowUpdateHandle<T>- Parameters:
timeout- maximum time to wait and perform the background long pollingunit- unit of timeout- Returns:
- future completed with the result of the update or an exception
-
getResult
public T getResult()
Description copied from interface:WorkflowUpdateHandleReturns the result of the workflow update.- Specified by:
getResultin interfaceWorkflowUpdateHandle<T>- Returns:
- the result of the workflow update
-
getResult
public T getResult(long timeout, java.util.concurrent.TimeUnit unit)
Description copied from interface:WorkflowUpdateHandleReturns the result of the workflow update.- Specified by:
getResultin interfaceWorkflowUpdateHandle<T>- Parameters:
timeout- maximum time to wait and perform the background long pollingunit- unit of timeout- Returns:
- the result of the workflow update
-
getResultAsync
public java.util.concurrent.CompletableFuture<T> getResultAsync()
Description copied from interface:WorkflowUpdateHandleReturns aCompletableFuturewith the update workflow execution request result, potentially waiting for the update to complete.- Specified by:
getResultAsyncin interfaceWorkflowUpdateHandle<T>- Returns:
- future completed with the result of the update or an exception
-
-