Record Class DedupeEntry
java.lang.Object
java.lang.Record
org.j7m.middleware.api.reliability.DedupeEntry
- Record Components:
key- dedupe keyoperationId- optional durable operation id, ornullrecordedAtMillis- wall-clock time in millisecondsresultMetadata- safe result metadata
- All Implemented Interfaces:
Serializable
public record DedupeEntry(DedupeKey key, DurableOperationId operationId, long recordedAtMillis, Map<String,String> resultMetadata)
extends Record
implements Serializable
Non-payload metadata recorded for a dedupe key.
The record is immutable, serializable, and thread-safe. The result metadata is an application-supplied safe fingerprint or status summary, not a raw result payload.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDedupeEntry(DedupeKey key, DurableOperationId operationId, long recordedAtMillis, Map<String, String> resultMetadata) Creates a validated dedupe entry. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.Returns the value of theoperationIdrecord component.longReturns the value of therecordedAtMillisrecord component.Returns the value of theresultMetadatarecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DedupeEntry
public DedupeEntry(DedupeKey key, DurableOperationId operationId, long recordedAtMillis, Map<String, String> resultMetadata) Creates a validated dedupe entry.- Throws:
IllegalArgumentException- when key is missing or timestamp is negative
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
key
-
operationId
Returns the value of theoperationIdrecord component.- Returns:
- the value of the
operationIdrecord component
-
recordedAtMillis
public long recordedAtMillis()Returns the value of therecordedAtMillisrecord component.- Returns:
- the value of the
recordedAtMillisrecord component
-
resultMetadata
Returns the value of theresultMetadatarecord component.- Returns:
- the value of the
resultMetadatarecord component
-