Package io.temporal.internal.sync
Class NexusOperationHandleImpl<R>
- java.lang.Object
-
- io.temporal.internal.sync.NexusOperationHandleImpl<R>
-
- All Implemented Interfaces:
NexusOperationHandle<R>
public class NexusOperationHandleImpl<R> extends java.lang.Object implements NexusOperationHandle<R>
-
-
Constructor Summary
Constructors Constructor Description NexusOperationHandleImpl(Promise<NexusOperationExecution> operationExecution, Promise<R> result)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Promise<NexusOperationExecution>
getExecution()
Returns a promise that is resolved when the operation reaches the STARTED state.Promise<R>
getResult()
Returns a promise that will be resolved when the operation completes.
-
-
-
Constructor Detail
-
NexusOperationHandleImpl
public NexusOperationHandleImpl(Promise<NexusOperationExecution> operationExecution, Promise<R> result)
-
-
Method Detail
-
getExecution
public Promise<NexusOperationExecution> getExecution()
Description copied from interface:NexusOperationHandle
Returns a promise that is resolved when the operation reaches the STARTED state. For synchronous operations, this will be resolved at the same time as the promise from executeAsync. For asynchronous operations, this promises is resolved independently. If the operation is unsuccessful, this promise will throw the same exception as executeAsync. Use this method to extract the Operation ID of an asynchronous operation. OperationID will be empty for synchronous operations. If the workflow completes before this promise is ready then the operation might not start at all.- Specified by:
getExecution
in interfaceNexusOperationHandle<R>
- Returns:
- promise that becomes ready once the operation has started.
-
getResult
public Promise<R> getResult()
Description copied from interface:NexusOperationHandle
Returns a promise that will be resolved when the operation completes.- Specified by:
getResult
in interfaceNexusOperationHandle<R>
-
-