Record Class MemberAdvertisement
java.lang.Object
java.lang.Record
io.axoniq.framework.springcloud.discovery.MemberAdvertisement
- Record Components:
nodeId- the identifier of the answering application, unique to its processcapabilities- the messages the answering application handles, and the command load it asks for
What a member of the cluster reports about itself when asked: who it is, and what it handles.
The nodeId is what identifies a member, rather than anything discovery reports about it. One running
application may be reported more than once, for example under two service ids or at two addresses, and is still one
member as long as every report leads to the same nodeId. The same goes for this application's own instance:
it is recognized among the discovered instances by answering with this application's own nodeId.
- Since:
- 5.4.0
- Author:
- Allard Buijze
-
Constructor Summary
ConstructorsConstructorDescriptionMemberAdvertisement(String nodeId, MemberCapabilities capabilities) Compact constructor validating that both thenodeIdand thecapabilitiesare present. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecapabilitiesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.nodeId()Returns the value of thenodeIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MemberAdvertisement
Compact constructor validating that both thenodeIdand thecapabilitiesare present.- Parameters:
nodeId- the identifier of the answering application, unique to its processcapabilities- the messages the answering application handles, and the command load it asks for
-
-
Method Details
-
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. -
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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
nodeId
Returns the value of thenodeIdrecord component.- Returns:
- the value of the
nodeIdrecord component
-
capabilities
Returns the value of thecapabilitiesrecord component.- Returns:
- the value of the
capabilitiesrecord component
-