Record Class EventSubscriptionProfile
java.lang.Object
java.lang.Record
org.j7m.middleware.application.distributed.EventSubscriptionProfile
- Record Components:
source- authorized event source endpointmetadata- separately authorized durable manifest endpointsourceNamespace- stable host identity for this source scope, independent of network addresseslease- subscription lease, 1second..1day, advanced by the source's trusted clock servicepollInterval- delay after completed processing, 1millisecond..1minute and less than lease/3operationBudget- finite source operation budget, 1millisecond..25secondshandlerBudget- original handler budget, 1millisecond..1daymaximumPage- native scanned-position bound, 1..256maximumSnapshotBytes- allowed projection size, 1..64MiBrestart- explicit durable-projection resume or complete projection replacementexpiry- explicit stop or resnapshot on authoritative expiry
public record EventSubscriptionProfile(org.j7m.middleware.distributed.ResourceEndpoint source, org.j7m.middleware.distributed.ResourceEndpoint metadata, String sourceNamespace, Duration lease, Duration pollInterval, Duration operationBudget, Duration handlerBudget, int maximumPage, int maximumSnapshotBytes, EventSubscriptionProfile.Restart restart, EventSubscriptionProfile.Expiry expiry)
extends Record
Immutable host-owned subscription profile. Endpoints are borrowed and retain their own authorized
source/metadata scopes across refresh. Metadata must have a separate scope so internal manifests
cannot appear in the application source projection. No remote endpoint is selected by annotations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumChooses behavior after authoritative loss of retained history or subscription lease.static enumChooses how a known active subscription reconstructs application state on activation. -
Constructor Summary
ConstructorsConstructorDescriptionEventSubscriptionProfile(org.j7m.middleware.distributed.ResourceEndpoint source, org.j7m.middleware.distributed.ResourceEndpoint metadata, String sourceNamespace, Duration lease, Duration pollInterval, Duration operationBudget, Duration handlerBudget, int maximumPage, int maximumSnapshotBytes, EventSubscriptionProfile.Restart restart, EventSubscriptionProfile.Expiry expiry) Validates finite limits without accessing endpoints or starting workers. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.expiry()Returns the value of theexpiryrecord component.Returns the value of thehandlerBudgetrecord component.final inthashCode()Returns a hash code value for this object.lease()Returns the value of theleaserecord component.intReturns the value of themaximumPagerecord component.intReturns the value of themaximumSnapshotBytesrecord component.org.j7m.middleware.distributed.ResourceEndpointmetadata()Returns the value of themetadatarecord component.Returns the value of theoperationBudgetrecord component.Returns the value of thepollIntervalrecord component.restart()Returns the value of therestartrecord component.org.j7m.middleware.distributed.ResourceEndpointsource()Returns the value of thesourcerecord component.Returns the value of thesourceNamespacerecord component.toString()Omits endpoint identities and source namespace from incidental diagnostics.
-
Constructor Details
-
EventSubscriptionProfile
public EventSubscriptionProfile(org.j7m.middleware.distributed.ResourceEndpoint source, org.j7m.middleware.distributed.ResourceEndpoint metadata, String sourceNamespace, Duration lease, Duration pollInterval, Duration operationBudget, Duration handlerBudget, int maximumPage, int maximumSnapshotBytes, EventSubscriptionProfile.Restart restart, EventSubscriptionProfile.Expiry expiry) Validates finite limits without accessing endpoints or starting workers.- Parameters:
source- borrowed authorized sourcemetadata- borrowed separately scoped manifest endpointsourceNamespace- host-owned stable source identitylease- finite source leasepollInterval- bounded scheduling delayoperationBudget- finite native operation deadlinehandlerBudget- finite original application deadlinemaximumPage- native scanned-position limitmaximumSnapshotBytes- bounded snapshot bytesrestart- explicit restart modeexpiry- explicit expiry policy- Throws:
IllegalArgumentException- for invalid limits or identical endpoint objectsNullPointerException- for null profile members
-
-
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. -
source
-
metadata
-
sourceNamespace
Returns the value of thesourceNamespacerecord component.- Returns:
- the value of the
sourceNamespacerecord component
-
lease
-
pollInterval
Returns the value of thepollIntervalrecord component.- Returns:
- the value of the
pollIntervalrecord component
-
operationBudget
Returns the value of theoperationBudgetrecord component.- Returns:
- the value of the
operationBudgetrecord component
-
handlerBudget
Returns the value of thehandlerBudgetrecord component.- Returns:
- the value of the
handlerBudgetrecord component
-
maximumPage
public int maximumPage()Returns the value of themaximumPagerecord component.- Returns:
- the value of the
maximumPagerecord component
-
maximumSnapshotBytes
public int maximumSnapshotBytes()Returns the value of themaximumSnapshotBytesrecord component.- Returns:
- the value of the
maximumSnapshotBytesrecord component
-
restart
-
expiry
-