Enum Class IdReusePolicy

java.lang.Object
java.lang.Enum<IdReusePolicy>
io.superdurable.dex.IdReusePolicy
All Implemented Interfaces:
Serializable, Comparable<IdReusePolicy>, Constable

public enum IdReusePolicy extends Enum<IdReusePolicy>
Controls whether Client.startFlow(Flow, String, I) may reuse an existing Flow ID.

Set the policy with StartFlowOptions.Builder.idReusePolicy. The policy is evaluated by the server against prior and currently running executions with the same Flow ID.

  • Enum Constant Details

    • DEFAULT

      public static final IdReusePolicy DEFAULT
      Uses the Dex server default, which rejects every previously used Flow ID.
    • ALLOW_IF_PREVIOUS_FAILED

      public static final IdReusePolicy ALLOW_IF_PREVIOUS_FAILED
      Allows reuse only when the previous execution ended abnormally.
    • ALLOW_IF_NOT_RUNNING

      public static final IdReusePolicy ALLOW_IF_NOT_RUNNING
      Allows reuse when no execution with the ID is currently running.
    • DISALLOW

      public static final IdReusePolicy DISALLOW
      Rejects every attempt to reuse the Flow ID.
    • TERMINATE_IF_RUNNING

      public static final IdReusePolicy TERMINATE_IF_RUNNING
      Terminates a running execution before starting the replacement.
  • Method Details

    • values

      public static IdReusePolicy[] 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

      public static IdReusePolicy valueOf(String name)
      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 name
      NullPointerException - if the argument is null