Record Class QueryDispatchFailure

java.lang.Object
java.lang.Record
io.axoniq.framework.springcloud.query.QueryDispatchFailure
Record Components:
requestIdentifier - the identifier of the query that failed
errorCode - what kind of failure this is, which decides the exception the dispatching member raises, or null when the answering member reported a kind this one does not recognise
errorMessage - the failure's message
errorDetails - the messages of the failure and its causes, in order, so that the dispatching member can report where a failure originated without needing the classes involved.
errorOrigin - the name of the member the failure occurred on
errorDetailsType - the runtime class name of the application-specific details, or null when the failure carried none. Described the same way on the command side, so that a member reading either kind of failure reads one thing
errorDetailsPayload - the application-specific details, Base64-encoded, or null when the failure carried none

public record QueryDispatchFailure(String requestIdentifier, @Nullable QueryErrorCode errorCode, @Nullable String errorMessage, List<String> errorDetails, @Nullable String errorOrigin, @Nullable String errorDetailsType, @Nullable String errorDetailsPayload) extends Record
The wire representation of a failure that ended a query's response stream.

A stream that ends without one of these completed normally, however many responses it carried.

Since:
5.4.0
Author:
Allard Buijze
  • Constructor Details

    • QueryDispatchFailure

      public QueryDispatchFailure(String requestIdentifier, @Nullable QueryErrorCode errorCode, @Nullable String errorMessage, List<String> errorDetails, @Nullable String errorOrigin, @Nullable String errorDetailsType, @Nullable String errorDetailsPayload)
      Compact constructor requiring a requestIdentifier, and defaulting null error details to an empty list so a failure reported by a member that omits the field still reads.
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • requestIdentifier

      public String requestIdentifier()
      Returns the value of the requestIdentifier record component.
      Returns:
      the value of the requestIdentifier record component
    • errorCode

      public @Nullable QueryErrorCode errorCode()
      Returns the value of the errorCode record component.
      Returns:
      the value of the errorCode record component
    • errorMessage

      public @Nullable String errorMessage()
      Returns the value of the errorMessage record component.
      Returns:
      the value of the errorMessage record component
    • errorDetails

      public List<String> errorDetails()
      Returns the value of the errorDetails record component.
      Returns:
      the value of the errorDetails record component
    • errorOrigin

      public @Nullable String errorOrigin()
      Returns the value of the errorOrigin record component.
      Returns:
      the value of the errorOrigin record component
    • errorDetailsType

      public @Nullable String errorDetailsType()
      Returns the value of the errorDetailsType record component.
      Returns:
      the value of the errorDetailsType record component
    • errorDetailsPayload

      public @Nullable String errorDetailsPayload()
      Returns the value of the errorDetailsPayload record component.
      Returns:
      the value of the errorDetailsPayload record component