Enum Class DuplicateDetectionPolicy

java.lang.Object
java.lang.Enum<DuplicateDetectionPolicy>
org.j7m.middleware.api.reliability.DuplicateDetectionPolicy
All Implemented Interfaces:
Serializable, Comparable<DuplicateDetectionPolicy>, Constable

public enum DuplicateDetectionPolicy extends Enum<DuplicateDetectionPolicy>
Duplicate handling policy for a dedupe key.

The enum is immutable and thread-safe. Durable duplicate detection is a later phase; Phase 6.1 defines the policy contract and a non-durable test implementation.

  • Enum Constant Details

    • DISABLED

      public static final DuplicateDetectionPolicy DISABLED
      Do not perform duplicate detection.
    • REJECT_DUPLICATE

      public static final DuplicateDetectionPolicy REJECT_DUPLICATE
      Reject an invocation when its dedupe key was already seen.
    • RETURN_PREVIOUS_RESULT

      public static final DuplicateDetectionPolicy RETURN_PREVIOUS_RESULT
      Return the previous result metadata when it is available.
    • ALLOW_DUPLICATE_MARKED

      public static final DuplicateDetectionPolicy ALLOW_DUPLICATE_MARKED
      Allow the invocation and mark it as a duplicate.
  • Method Details

    • values

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