Package org.axonframework.deadline
Record Class UnknownDeadlinePayload
java.lang.Object
java.lang.Record
org.axonframework.deadline.UnknownDeadlinePayload
- Record Components:
typeName- the stored name of the payload type, which could not be resolvedrevision- the stored revision of the payload type, if anydata- the stored payload, as abyte[]or aString, depending on the deadline manager
public record UnknownDeadlinePayload(String typeName, @Nullable String revision, @Nullable Object data)
extends Record
The payload of a fired deadline whose stored payload type name could not be resolved to a class.
The persistent deadline managers (QuartzDeadlineManager,
JobRunrDeadlineManager and
DbSchedulerDeadlineManager) store a deadline's payload together with
the name of its type. When a deadline fires on a node that lacks that type, for example because the payload class was
renamed or moved while the deadline was pending, the deadline fires with this payload instead of failing, and the
job completes. Axon Framework 4 did the same through its UnknownSerializedType.
A DeadlineHandler without a payload parameter receives it. A handler
that declares another payload type does not. To read the content, convert the data() with the
Converter the deadline manager was configured with:
@DeadlineHandler(deadlineName = "paymentDue")
public void on(DeadlineMessage deadline) {
if (deadline.payload() instanceof UnknownDeadlinePayload unknown) {
logger.warn("Deadline with payload type [{}] fired, but that type is unknown", unknown.typeName());
}
}
- Since:
- 5.4.0
- Author:
- Jakob Hatzl
-
Constructor Summary
ConstructorsConstructorDescriptionUnknownDeadlinePayload(String typeName, @Nullable String revision, @Nullable Object data) Creates anUnknownDeadlinePayloadfor the given storedtypeName,revisionanddata. -
Method Summary
Modifier and TypeMethodDescription@Nullable Objectdata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Stringrevision()Returns the value of therevisionrecord component.final StringtoString()Returns a string representation of this record class.typeName()Returns the value of thetypeNamerecord component.
-
Constructor Details
-
UnknownDeadlinePayload
Creates anUnknownDeadlinePayloadfor the given storedtypeName,revisionanddata.- Parameters:
typeName- the stored name of the payload type, which could not be resolvedrevision- the stored revision of the payload type, if anydata- the stored payload, as abyte[]or aString, depending on the deadline manager
-
-
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). -
typeName
Returns the value of thetypeNamerecord component.- Returns:
- the value of the
typeNamerecord component
-
revision
Returns the value of therevisionrecord component.- Returns:
- the value of the
revisionrecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-