Enum Class QueryErrorCode

java.lang.Object
java.lang.Enum<QueryErrorCode>
io.axoniq.framework.springcloud.query.QueryErrorCode
All Implemented Interfaces:
Serializable, Comparable<QueryErrorCode>, Constable

public enum QueryErrorCode extends Enum<QueryErrorCode>
What kind of failure ended a query's response stream, as reported to the member that dispatched the query.

The distinction that matters to the dispatching member is whether trying again could succeed. A query no member handles yet may be handled once one finishes starting up, while a query whose handler rejected it will be rejected again by the same input.

Since:
5.4.0
Author:
Allard Buijze
  • Enum Constant Details

    • NO_HANDLER_FOR_QUERY

      public static final QueryErrorCode NO_HANDLER_FOR_QUERY
      The member had no handler for the query.
    • QUERY_EXECUTION_ERROR

      public static final QueryErrorCode QUERY_EXECUTION_ERROR
      The query's handler failed, in a way that trying again may not repeat.
    • QUERY_EXECUTION_NON_TRANSIENT_ERROR

      public static final QueryErrorCode QUERY_EXECUTION_NON_TRANSIENT_ERROR
      The query's handler failed in a way that will repeat, so trying again is pointless.

      A query the answering member could not even read is reported this way too: it never reached a handler, and sending the same bytes again cannot change that.

  • Method Details

    • values

      public static QueryErrorCode[] 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 QueryErrorCode 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
    • classify

      public static QueryErrorCode classify(Throwable cause)
      Classifies the given cause as the code to report it under.
      Parameters:
      cause - the failure to classify
      Returns:
      the code the given cause is reported under