Enum Class ValidationDecision

java.lang.Object
java.lang.Enum<ValidationDecision>
io.confluent.kafka.schemaregistry.validator.core.ValidationDecision
All Implemented Interfaces:
Serializable, Comparable<ValidationDecision>, Constable

public enum ValidationDecision extends Enum<ValidationDecision>
Outcome of validating one record.

Deliberately separate from RecordInterceptor.RecordInterceptorResponse: the broker maps RETRY to UNKNOWN_TOPIC_OR_PARTITION, whereas Kora Edge cannot synthesize a Kafka response at all and expresses rejection by tearing down the connection. The three values do not mean the same thing on both sides, so each adapter maps them to its own response type.

  • Enum Constant Details

    • ACCEPT

      public static final ValidationDecision ACCEPT
      The record passed validation and may be appended.
    • REJECT

      public static final ValidationDecision REJECT
      The record failed validation and must not be appended.
    • RETRY

      public static final ValidationDecision RETRY
      Validation could not be completed from cache. The record is neither accepted nor rejected; the caller should ask the producer to retry once the background fetch has populated the cache.
  • Method Details

    • values

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