Record Class RegistryQuery

java.lang.Object
java.lang.Record
org.j7m.middleware.registry.api.RegistryQuery
Record Components:
serviceName - logical service name
interfaces - required interface names
requiredParams - required parameter key/value pairs
registryContext - registry context
nowMillis - time used for expiration filtering
limit - maximum number of candidates
deadlineMillis - absolute deadline in epoch milliseconds
maxPeerCount - maximum peers that a discovery-backed registry may contact
maxDepth - maximum bootstrap expansion depth
source - preferred discovery source

public record RegistryQuery(String serviceName, List<String> interfaces, Map<String,String> requiredParams, String registryContext, long nowMillis, int limit, long deadlineMillis, int maxPeerCount, int maxDepth, DiscoverySource source) extends Record
Immutable query for registry candidate listing.
  • Constructor Details

    • RegistryQuery

      public RegistryQuery(String serviceName, List<String> interfaces, Map<String,String> requiredParams, String registryContext, long nowMillis, int limit, long deadlineMillis, int maxPeerCount, int maxDepth, DiscoverySource source)
      Creates immutable query fields.
    • RegistryQuery

      public RegistryQuery(String serviceName, List<String> interfaces, Map<String,String> requiredParams, String registryContext, long nowMillis, int limit)
      Creates a compatibility query with Phase 1 fields.
      Parameters:
      serviceName - logical service name
      interfaces - required interface names
      requiredParams - required parameters
      registryContext - registry context
      nowMillis - expiration timestamp
      limit - maximum result count
  • Method Details

    • 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.
    • serviceName

      public String serviceName()
      Returns the value of the serviceName record component.
      Returns:
      the value of the serviceName record component
    • interfaces

      public List<String> interfaces()
      Returns the value of the interfaces record component.
      Returns:
      the value of the interfaces record component
    • requiredParams

      public Map<String,String> requiredParams()
      Returns the value of the requiredParams record component.
      Returns:
      the value of the requiredParams record component
    • registryContext

      public String registryContext()
      Returns the value of the registryContext record component.
      Returns:
      the value of the registryContext record component
    • nowMillis

      public long nowMillis()
      Returns the value of the nowMillis record component.
      Returns:
      the value of the nowMillis record component
    • limit

      public int limit()
      Returns the value of the limit record component.
      Returns:
      the value of the limit record component
    • deadlineMillis

      public long deadlineMillis()
      Returns the value of the deadlineMillis record component.
      Returns:
      the value of the deadlineMillis record component
    • maxPeerCount

      public int maxPeerCount()
      Returns the value of the maxPeerCount record component.
      Returns:
      the value of the maxPeerCount record component
    • maxDepth

      public int maxDepth()
      Returns the value of the maxDepth record component.
      Returns:
      the value of the maxDepth record component
    • source

      public DiscoverySource source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component