Record Class ConsumerFilter
java.lang.Object
java.lang.Record
io.fluxzero.common.api.tracking.ConsumerFilter
- Record Components:
subscriptionId- unique effective-consumer identity shared by its transport sessions; null scopes to one sessionrevision- monotonically increasing revision within one client session and consumerversion- filter language version; currently2format- payload format for whichpayloadTypesis complete; other formats remain eligiblepayloadTypes- eligible payload names/revisions when payloadRestricted is trueroutes- eligible logical routes when routeRestricted is trueupcastInputs- inputs that must bypass both constraints because upcasting may change type or metadatapayloadRestricted- whether payloadTypes is a complete constraintrouteRestricted- whether routes is a complete constraintreferenceOnly- whether this read refers to a previously supplied snapshot instead of carrying its constraints
public record ConsumerFilter(String subscriptionId, long revision, int version, String format, List<ConsumerFilter.PayloadType> payloadTypes, List<ConsumerFilter.RoutePattern> routes, List<ConsumerFilter.PayloadType> upcastInputs, boolean payloadRestricted, boolean routeRestricted, boolean referenceOnly)
extends Record
Versioned, conservative projection of an application's effective consumer blueprint. Filters are delivery
optimizations, never authorization rules. Missing constraints and unknown versions allow delivery.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA serialized input name, optionally limited to one revision or matching an entire package prefix.static final recordGeneric route matcher. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConsumerFilter(String subscriptionId, long revision, int version, String format, List<ConsumerFilter.PayloadType> payloadTypes, List<ConsumerFilter.RoutePattern> routes, List<ConsumerFilter.PayloadType> upcastInputs, boolean payloadRestricted, boolean routeRestricted, boolean referenceOnly) Creates an instance of aConsumerFilterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionCompact reference to a full snapshot.compile()Compiles once at the subscription boundary; no regex compilation or application class loading occurs per message.final booleanIndicates whether some other object is "equal to" this one.format()Returns the value of theformatrecord component.forRevision(String subscriptionId, long revision, String format, List<ConsumerFilter.PayloadType> upcastInputs) Returns the same contract with its lifecycle revision and current serializer migration inputs.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thepayloadRestrictedrecord component.Returns the value of thepayloadTypesrecord component.booleanReturns the value of thereferenceOnlyrecord component.longrevision()Returns the value of therevisionrecord component.booleanReturns the value of therouteRestrictedrecord component.routes()Returns the value of theroutesrecord component.static ConsumerFilterselect(String subscriptionId, long revision, int version, String format, List<ConsumerFilter.PayloadType> payloadTypes, List<ConsumerFilter.RoutePattern> routes, List<ConsumerFilter.PayloadType> upcastInputs) Builds a selection from complete handler facts.Returns the value of thesubscriptionIdrecord component.final StringtoString()Returns a string representation of this record class.static ConsumerFilterunion(Collection<ConsumerFilter> filters) Combines alternative handlers; an unknown constraint widens the corresponding selection.static ConsumerFilterBuilds an unrestricted projection for metadata that cannot safely be narrowed.Returns the value of theupcastInputsrecord component.intversion()Returns the value of theversionrecord component.
-
Field Details
-
VERSION
public static final int VERSION- See Also:
-
-
Constructor Details
-
ConsumerFilter
public ConsumerFilter(String subscriptionId, long revision, int version, String format, List<ConsumerFilter.PayloadType> payloadTypes, List<ConsumerFilter.RoutePattern> routes, List<ConsumerFilter.PayloadType> upcastInputs, boolean payloadRestricted, boolean routeRestricted, boolean referenceOnly) Creates an instance of aConsumerFilterrecord class.- Parameters:
subscriptionId- the value for thesubscriptionIdrecord componentrevision- the value for therevisionrecord componentversion- the value for theversionrecord componentformat- the value for theformatrecord componentpayloadTypes- the value for thepayloadTypesrecord componentroutes- the value for theroutesrecord componentupcastInputs- the value for theupcastInputsrecord componentpayloadRestricted- the value for thepayloadRestrictedrecord componentrouteRestricted- the value for therouteRestrictedrecord componentreferenceOnly- the value for thereferenceOnlyrecord component
-
-
Method Details
-
select
public static ConsumerFilter select(String subscriptionId, long revision, int version, String format, List<ConsumerFilter.PayloadType> payloadTypes, List<ConsumerFilter.RoutePattern> routes, List<ConsumerFilter.PayloadType> upcastInputs) Builds a selection from complete handler facts. Null lists indicate unknown constraints; explicit flags on the wire preserve that distinction even for peers whose JSON collection handling normalizes null to empty. -
unrestricted
Builds an unrestricted projection for metadata that cannot safely be narrowed. -
union
Combines alternative handlers; an unknown constraint widens the corresponding selection. -
forRevision
public ConsumerFilter forRevision(String subscriptionId, long revision, String format, List<ConsumerFilter.PayloadType> upcastInputs) Returns the same contract with its lifecycle revision and current serializer migration inputs. -
asReference
Compact reference to a full snapshot. An unknown reference must be resolved before claiming or scanning. -
compile
Compiles once at the subscription boundary; no regex compilation or application class loading occurs per message. -
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. -
subscriptionId
Returns the value of thesubscriptionIdrecord component.- Returns:
- the value of the
subscriptionIdrecord component
-
revision
-
version
-
format
-
payloadTypes
Returns the value of thepayloadTypesrecord component.- Returns:
- the value of the
payloadTypesrecord component
-
routes
-
upcastInputs
Returns the value of theupcastInputsrecord component.- Returns:
- the value of the
upcastInputsrecord component
-
payloadRestricted
public boolean payloadRestricted()Returns the value of thepayloadRestrictedrecord component.- Returns:
- the value of the
payloadRestrictedrecord component
-
routeRestricted
public boolean routeRestricted()Returns the value of therouteRestrictedrecord component.- Returns:
- the value of the
routeRestrictedrecord component
-
referenceOnly
public boolean referenceOnly()Returns the value of thereferenceOnlyrecord component.- Returns:
- the value of the
referenceOnlyrecord component
-