Record Class MulticastRegistryOptions
java.lang.Object
java.lang.Record
org.j7m.middleware.registry.mcast.MulticastRegistryOptions
- Record Components:
registryId- local registry idcontextId- registry context/application scopegroup- multicast group addressport- multicast portnetworkInterface- optional network interfacequeryDeadline- query deadlinegatherAfterFirstResponse- duration to gather list responses after first matchquestionTtl- question cache TTLmaxResults- maximum results per querymaxPeers- maximum peers per queryttl- multicast hop limitreceiveBufferBytes- requested receive buffer sizemaxMessageBytes- maximum accepted UDP payload sizebus- 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 Summary
ConstructorsConstructorDescriptionMulticastRegistryOptions(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(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. -
Method Summary
Modifier and TypeMethodDescriptionbus()Returns the value of thebusrecord component.Returns the value of thecontextIdrecord component.static MulticastRegistryOptionsCreates default options for one registry id.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegatherAfterFirstResponserecord component.group()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxMessageBytesrecord component.intReturns the maximum number of peer graph entries retained by a multicast client.intmaxPeers()Returns the value of themaxPeersrecord component.intReturns the value of themaxResultsrecord component.Returns the value of thenetworkInterfacerecord component.longReturns the peer graph retention window in milliseconds.intport()Returns the value of theportrecord component.Returns the value of thequeryDeadlinerecord component.Returns the value of thequestionTtlrecord component.intReturns the value of thereceiveBufferBytesrecord component.Returns the value of theregistryIdrecord component.final StringtoString()Returns a string representation of this record class.intttl()Returns the value of thettlrecord component.
-
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 idcontextId- registry contextgroup- multicast groupport- portnetworkInterface- network interfacequeryDeadline- query deadlinegatherAfterFirstResponse- gather durationquestionTtl- question TTLmaxResults- maximum resultsmaxPeers- maximum peersbus- multicast adapter
-
-
Method Details
-
defaults
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
-
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. -
registryId
Returns the value of theregistryIdrecord component.- Returns:
- the value of the
registryIdrecord component
-
contextId
-
group
-
port
-
networkInterface
Returns the value of thenetworkInterfacerecord component.- Returns:
- the value of the
networkInterfacerecord component
-
queryDeadline
Returns the value of thequeryDeadlinerecord component.- Returns:
- the value of the
queryDeadlinerecord component
-
gatherAfterFirstResponse
Returns the value of thegatherAfterFirstResponserecord component.- Returns:
- the value of the
gatherAfterFirstResponserecord component
-
questionTtl
Returns the value of thequestionTtlrecord component.- Returns:
- the value of the
questionTtlrecord component
-
maxResults
public int maxResults()Returns the value of themaxResultsrecord component.- Returns:
- the value of the
maxResultsrecord component
-
maxPeers
-
ttl
-
receiveBufferBytes
public int receiveBufferBytes()Returns the value of thereceiveBufferBytesrecord component.- Returns:
- the value of the
receiveBufferBytesrecord component
-
maxMessageBytes
public int maxMessageBytes()Returns the value of themaxMessageBytesrecord component.- Returns:
- the value of the
maxMessageBytesrecord component
-
bus
-