Enum Class NexusOperationCancellationType
- All Implemented Interfaces:
Serializable,Comparable<NexusOperationCancellationType>,Constable
@Experimental
public enum NexusOperationCancellationType
extends Enum<NexusOperationCancellationType>
Defines behavior of the parent workflow when
CancellationScope that wraps Nexus operation
is canceled. The result of the cancellation independently of the type is a CanceledFailure thrown 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDo not request cancellation of the operation and immediately report cancellation to the caller.Initiate a cancellation request and immediately report cancellation to the caller.Wait for operation completion.Request cancellation of the operation and wait for confirmation that the request was received. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static NexusOperationCancellationType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WAIT_COMPLETED
Wait for operation completion. Operation may or may not complete as cancelled. Default. -
WAIT_REQUESTED
Request cancellation of the operation and wait for confirmation that the request was received. Doesn't wait for actual cancellation. -
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
Do not request cancellation of the operation and immediately report cancellation to the caller.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-