Record Class MulticastRegistryOptions

java.lang.Object
java.lang.Record
org.j7m.middleware.registry.mcast.MulticastRegistryOptions
Record Components:
registryId - local registry id
contextId - registry context/application scope
group - multicast group address
port - multicast port
networkInterface - optional network interface
queryDeadline - query deadline
gatherAfterFirstResponse - duration to gather list responses after first match
questionTtl - question cache TTL
maxResults - maximum results per query
maxPeers - maximum peers per query
ttl - multicast hop limit
receiveBufferBytes - requested receive buffer size
maxMessageBytes - maximum accepted UDP payload size
bus - multicast adapter

public record MulticastRegistryOptions(String registryId, String contextId, String group, int port, NetworkInterface networkInterface, Duration queryDeadline, Duration gatherAfterFirstResponse, Duration questionTtl, int maxResults, int maxPeers, int ttl, int receiveBufferBytes, int maxMessageBytes, MulticastBus bus) extends Record
Immutable multicast registry options.
  • Constructor Details

    • MulticastRegistryOptions

      public MulticastRegistryOptions(String registryId, String contextId, String group, int port, NetworkInterface networkInterface, Duration queryDeadline, Duration gatherAfterFirstResponse, Duration questionTtl, int maxResults, int maxPeers, int ttl, int receiveBufferBytes, int maxMessageBytes, MulticastBus bus)
      Creates multicast options.
    • MulticastRegistryOptions

      public MulticastRegistryOptions(String registryId, String contextId, String group, int port, NetworkInterface networkInterface, Duration queryDeadline, Duration gatherAfterFirstResponse, Duration questionTtl, int maxResults, int maxPeers, MulticastBus bus)
      Creates options using the compatibility Phase 2 argument list.
      Parameters:
      registryId - local registry id
      contextId - registry context
      group - multicast group
      port - port
      networkInterface - network interface
      queryDeadline - query deadline
      gatherAfterFirstResponse - gather duration
      questionTtl - question TTL
      maxResults - maximum results
      maxPeers - maximum peers
      bus - multicast adapter
  • Method Details

    • defaults

      public static MulticastRegistryOptions defaults(String registryId)
      Creates default options for one registry id.
      Parameters:
      registryId - registry id
      Returns:
      options
    • maxPeerGraphEntries

      public int maxPeerGraphEntries()
      Returns the maximum number of peer graph entries retained by a multicast client.

      The value is derived from the existing peer query limit to preserve constructor compatibility while bounding peer state admitted from UDP and in-memory multicast responses.

      Returns:
      peer graph entry limit
    • peerGraphTtlMillis

      public long peerGraphTtlMillis()
      Returns the peer graph retention window in milliseconds.

      Stale peer entries older than twice the configured question TTL are removed before peer graph updates and peer status reads.

      Returns:
      peer graph retention window in milliseconds
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
    • registryId

      public String registryId()
      Returns the value of the registryId record component.
      Returns:
      the value of the registryId record component
    • contextId

      public String contextId()
      Returns the value of the contextId record component.
      Returns:
      the value of the contextId record component
    • group

      public String group()
      Returns the value of the group record component.
      Returns:
      the value of the group record component
    • port

      public int port()
      Returns the value of the port record component.
      Returns:
      the value of the port record component
    • networkInterface

      public NetworkInterface networkInterface()
      Returns the value of the networkInterface record component.
      Returns:
      the value of the networkInterface record component
    • queryDeadline

      public Duration queryDeadline()
      Returns the value of the queryDeadline record component.
      Returns:
      the value of the queryDeadline record component
    • gatherAfterFirstResponse

      public Duration gatherAfterFirstResponse()
      Returns the value of the gatherAfterFirstResponse record component.
      Returns:
      the value of the gatherAfterFirstResponse record component
    • questionTtl

      public Duration questionTtl()
      Returns the value of the questionTtl record component.
      Returns:
      the value of the questionTtl record component
    • maxResults

      public int maxResults()
      Returns the value of the maxResults record component.
      Returns:
      the value of the maxResults record component
    • maxPeers

      public int maxPeers()
      Returns the value of the maxPeers record component.
      Returns:
      the value of the maxPeers record component
    • ttl

      public int ttl()
      Returns the value of the ttl record component.
      Returns:
      the value of the ttl record component
    • receiveBufferBytes

      public int receiveBufferBytes()
      Returns the value of the receiveBufferBytes record component.
      Returns:
      the value of the receiveBufferBytes record component
    • maxMessageBytes

      public int maxMessageBytes()
      Returns the value of the maxMessageBytes record component.
      Returns:
      the value of the maxMessageBytes record component
    • bus

      public MulticastBus bus()
      Returns the value of the bus record component.
      Returns:
      the value of the bus record component