Package io.temporal.workflow
Enum NexusOperationCancellationType
- java.lang.Object
-
- java.lang.Enum<NexusOperationCancellationType>
-
- io.temporal.workflow.NexusOperationCancellationType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<NexusOperationCancellationType>
public enum NexusOperationCancellationType extends java.lang.Enum<NexusOperationCancellationType>
Defines behavior of the parent workflow whenCancellationScopethat wraps Nexus operation is canceled. The result of the cancellation independently of the type is aCanceledFailurethrown from the Nexus operation method. If the caller exits without waiting, the cancellation request may not be delivered to the handler, regardless of indicated cancellation type.Note: Nexus operation cancellation can fail if the operation handler fails the cancellation request. In this case, the operation will throw the exception from the handler if cancellation has not already been reported to the caller.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ABANDONDo not request cancellation of the operation and immediately report cancellation to the caller.TRY_CANCELInitiate a cancellation request and immediately report cancellation to the caller.WAIT_COMPLETEDWait for operation completion.WAIT_REQUESTEDRequest cancellation of the operation and wait for confirmation that the request was received.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NexusOperationCancellationTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static NexusOperationCancellationType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
WAIT_COMPLETED
public static final NexusOperationCancellationType WAIT_COMPLETED
Wait for operation completion. Operation may or may not complete as cancelled. Default.
-
WAIT_REQUESTED
public static final NexusOperationCancellationType WAIT_REQUESTED
Request cancellation of the operation and wait for confirmation that the request was received. Doesn't wait for actual cancellation.
-
TRY_CANCEL
public static final NexusOperationCancellationType TRY_CANCEL
Initiate a cancellation request and immediately report cancellation to the caller. Note that it doesn't guarantee that cancellation is delivered to the operation handler if the caller exits before the delivery is done.
-
ABANDON
public static final NexusOperationCancellationType ABANDON
Do not request cancellation of the operation and immediately report cancellation to the caller.
-
-
Method Detail
-
values
public static NexusOperationCancellationType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (NexusOperationCancellationType c : NexusOperationCancellationType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NexusOperationCancellationType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-