Record Class RegistryQuery
java.lang.Object
java.lang.Record
org.j7m.middleware.registry.api.RegistryQuery
- Record Components:
serviceName- logical service nameinterfaces- required interface namesrequiredParams- required parameter key/value pairsregistryContext- registry contextnowMillis- time used for expiration filteringlimit- maximum number of candidatesdeadlineMillis- absolute deadline in epoch millisecondsmaxPeerCount- maximum peers that a discovery-backed registry may contactmaxDepth- maximum bootstrap expansion depthsource- preferred discovery source
-
Constructor Summary
ConstructorsConstructorDescriptionRegistryQuery(String serviceName, List<String> interfaces, Map<String, String> requiredParams, String registryContext, long nowMillis, int limit) Creates a compatibility query with Phase 1 fields.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. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thedeadlineMillisrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinterfacesrecord component.intlimit()Returns the value of thelimitrecord component.intmaxDepth()Returns the value of themaxDepthrecord component.intReturns the value of themaxPeerCountrecord component.longReturns the value of thenowMillisrecord component.Returns the value of theregistryContextrecord component.Returns the value of therequiredParamsrecord component.Returns the value of theserviceNamerecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RegistryQuery
-
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 nameinterfaces- required interface namesrequiredParams- required parametersregistryContext- registry contextnowMillis- expiration timestamplimit- maximum result count
-
-
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. -
serviceName
Returns the value of theserviceNamerecord component.- Returns:
- the value of the
serviceNamerecord component
-
interfaces
Returns the value of theinterfacesrecord component.- Returns:
- the value of the
interfacesrecord component
-
requiredParams
Returns the value of therequiredParamsrecord component.- Returns:
- the value of the
requiredParamsrecord component
-
registryContext
Returns the value of theregistryContextrecord component.- Returns:
- the value of the
registryContextrecord component
-
nowMillis
-
limit
-
deadlineMillis
public long deadlineMillis()Returns the value of thedeadlineMillisrecord component.- Returns:
- the value of the
deadlineMillisrecord component
-
maxPeerCount
public int maxPeerCount()Returns the value of themaxPeerCountrecord component.- Returns:
- the value of the
maxPeerCountrecord component
-
maxDepth
-
source
-