Record Class EventSubscriptionProfile

java.lang.Object
java.lang.Record
org.j7m.middleware.application.distributed.EventSubscriptionProfile
Record Components:
source - authorized event source endpoint
metadata - separately authorized durable manifest endpoint
sourceNamespace - stable host identity for this source scope, independent of network addresses
lease - subscription lease, 1second..1day, advanced by the source's trusted clock service
pollInterval - delay after completed processing, 1millisecond..1minute and less than lease/3
operationBudget - finite source operation budget, 1millisecond..25seconds
handlerBudget - original handler budget, 1millisecond..1day
maximumPage - native scanned-position bound, 1..256
maximumSnapshotBytes - allowed projection size, 1..64MiB
restart - explicit durable-projection resume or complete projection replacement
expiry - 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.
  • 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 source
      metadata - borrowed separately scoped manifest endpoint
      sourceNamespace - host-owned stable source identity
      lease - finite source lease
      pollInterval - bounded scheduling delay
      operationBudget - finite native operation deadline
      handlerBudget - finite original application deadline
      maximumPage - native scanned-position limit
      maximumSnapshotBytes - bounded snapshot bytes
      restart - explicit restart mode
      expiry - explicit expiry policy
      Throws:
      IllegalArgumentException - for invalid limits or identical endpoint objects
      NullPointerException - for null profile members
  • Method Details

    • toString

      public String toString()
      Omits endpoint identities and source namespace from incidental diagnostics.
      Specified by:
      toString in class Record
      Returns:
      fixed safe label
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • source

      public org.j7m.middleware.distributed.ResourceEndpoint source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • metadata

      public org.j7m.middleware.distributed.ResourceEndpoint metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component
    • sourceNamespace

      public String sourceNamespace()
      Returns the value of the sourceNamespace record component.
      Returns:
      the value of the sourceNamespace record component
    • lease

      public Duration lease()
      Returns the value of the lease record component.
      Returns:
      the value of the lease record component
    • pollInterval

      public Duration pollInterval()
      Returns the value of the pollInterval record component.
      Returns:
      the value of the pollInterval record component
    • operationBudget

      public Duration operationBudget()
      Returns the value of the operationBudget record component.
      Returns:
      the value of the operationBudget record component
    • handlerBudget

      public Duration handlerBudget()
      Returns the value of the handlerBudget record component.
      Returns:
      the value of the handlerBudget record component
    • maximumPage

      public int maximumPage()
      Returns the value of the maximumPage record component.
      Returns:
      the value of the maximumPage record component
    • maximumSnapshotBytes

      public int maximumSnapshotBytes()
      Returns the value of the maximumSnapshotBytes record component.
      Returns:
      the value of the maximumSnapshotBytes record component
    • restart

      Returns the value of the restart record component.
      Returns:
      the value of the restart record component
    • expiry

      Returns the value of the expiry record component.
      Returns:
      the value of the expiry record component