Record Class DedupeResult
java.lang.Object
java.lang.Record
org.j7m.middleware.api.reliability.DedupeResult
- Record Components:
status- duplicate detection statusaccepted- whether the invocation may proceedduplicate- whether a previous entry existedpreviousEntry- previous entry, ornullmetadata- safe decision metadata
- All Implemented Interfaces:
Serializable
public record DedupeResult(ReliabilityStatus status, boolean accepted, boolean duplicate, DedupeEntry previousEntry, Map<String,String> metadata)
extends Record
implements Serializable
Result of duplicate detection for one dedupe key.
The record is immutable, serializable, and thread-safe. Previous-result data is safe metadata only, not raw application payload.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDedupeResult(ReliabilityStatus status, boolean accepted, boolean duplicate, DedupeEntry previousEntry, Map<String, String> metadata) Creates a validated dedupe result. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepted()Returns the value of theacceptedrecord component.booleanReturns the value of theduplicaterecord component.final booleanIndicates whether some other object is "equal to" this one.static DedupeResultReturns a first-seen accepted result.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.Returns the value of thepreviousEntryrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DedupeResult
public DedupeResult(ReliabilityStatus status, boolean accepted, boolean duplicate, DedupeEntry previousEntry, Map<String, String> metadata) Creates a validated dedupe result.
-
-
Method Details
-
firstSeen
-
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. -
status
-
accepted
-
duplicate
-
previousEntry
Returns the value of thepreviousEntryrecord component.- Returns:
- the value of the
previousEntryrecord component
-
metadata
-