Record Class BindingSnapshot
java.lang.Object
java.lang.Record
org.j7m.middleware.application.api.BindingSnapshot
- Record Components:
generation- monotonic binding publication generationsourceRevision- last accepted source revisioncandidates- currently eligible bounded candidatesselected- selected concrete reference, empty when unavailablestatus- safe availability/lifecycle category
public record BindingSnapshot(long generation, long sourceRevision, List<ObjectRef> candidates, Optional<ObjectRef> selected, String status)
extends Record
Immutable typed refresh observation without callback payloads or caller credentials.
References are routing evidence and do not grant authority.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecandidatesrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of thegenerationrecord component.final inthashCode()Returns a hash code value for this object.selected()Returns the value of theselectedrecord component.longReturns the value of thesourceRevisionrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BindingSnapshot
public BindingSnapshot(long generation, long sourceRevision, List<ObjectRef> candidates, Optional<ObjectRef> selected, String status) Defensively copies bounded state.- Parameters:
generation- nonnegative publication generationsourceRevision- nonnegative accepted revisioncandidates- at most256 referencesselected- nonnull optional selected referencestatus- safe bounded status name- Throws:
IllegalArgumentException- for malformed state
-
-
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. -
generation
public long generation()Returns the value of thegenerationrecord component.- Returns:
- the value of the
generationrecord component
-
sourceRevision
public long sourceRevision()Returns the value of thesourceRevisionrecord component.- Returns:
- the value of the
sourceRevisionrecord component
-
candidates
Returns the value of thecandidatesrecord component.- Returns:
- the value of the
candidatesrecord component
-
selected
-
status
-