Enum 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 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.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ABANDON
      Do not request cancellation of the operation and immediately report cancellation to the caller.
      TRY_CANCEL
      Initiate a cancellation request and immediately report cancellation to the caller.
      WAIT_COMPLETED
      Wait for operation completion.
      WAIT_REQUESTED
      Request 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 NexusOperationCancellationType valueOf​(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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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 name
        java.lang.NullPointerException - if the argument is null