Record Class QueryDispatchFailure
java.lang.Object
java.lang.Record
io.axoniq.framework.springcloud.query.QueryDispatchFailure
- Record Components:
requestIdentifier- the identifier of the query that failederrorCode- what kind of failure this is, which decides the exception the dispatching member raises, ornullwhen the answering member reported a kind this one does not recogniseerrorMessage- the failure's messageerrorDetails- 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 onerrorDetailsType- the runtime class name of the application-specific details, ornullwhen the failure carried none. Described the same way on the command side, so that a member reading either kind of failure reads one thingerrorDetailsPayload- the application-specific details, Base64-encoded, ornullwhen 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 Summary
ConstructorsConstructorDescriptionQueryDispatchFailure(String requestIdentifier, @Nullable QueryErrorCode errorCode, @Nullable String errorMessage, List<String> errorDetails, @Nullable String errorOrigin, @Nullable String errorDetailsType, @Nullable String errorDetailsPayload) Compact constructor requiring arequestIdentifier, and defaultingnullerror details to an empty list so a failure reported by a member that omits the field still reads. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable QueryErrorCodeReturns the value of theerrorCoderecord component.Returns the value of theerrorDetailsrecord component.@Nullable StringReturns the value of theerrorDetailsPayloadrecord component.@Nullable StringReturns the value of theerrorDetailsTyperecord component.@Nullable StringReturns the value of theerrorMessagerecord component.@Nullable StringReturns the value of theerrorOriginrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of therequestIdentifierrecord component.final StringtoString()Returns a string representation of this record class.
-
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 arequestIdentifier, and defaultingnullerror details to an empty list so a failure reported by a member that omits the field still reads.
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
requestIdentifier
Returns the value of therequestIdentifierrecord component.- Returns:
- the value of the
requestIdentifierrecord component
-
errorCode
Returns the value of theerrorCoderecord component.- Returns:
- the value of the
errorCoderecord component
-
errorMessage
Returns the value of theerrorMessagerecord component.- Returns:
- the value of the
errorMessagerecord component
-
errorDetails
Returns the value of theerrorDetailsrecord component.- Returns:
- the value of the
errorDetailsrecord component
-
errorOrigin
Returns the value of theerrorOriginrecord component.- Returns:
- the value of the
errorOriginrecord component
-
errorDetailsType
Returns the value of theerrorDetailsTyperecord component.- Returns:
- the value of the
errorDetailsTyperecord component
-
errorDetailsPayload
Returns the value of theerrorDetailsPayloadrecord component.- Returns:
- the value of the
errorDetailsPayloadrecord component
-