Package org.mockserver.state
Record Class ClusterInfo.Member
java.lang.Object
java.lang.Record
org.mockserver.state.ClusterInfo.Member
- Record Components:
id- the member's id/address as a stringcoordinator- whether this member is the cluster coordinatorlocal- whether this member is the node serving the request
- Enclosing class:
- ClusterInfo
public static record ClusterInfo.Member(String id, boolean coordinator, boolean local)
extends Record
A single cluster member.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecoordinatorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanlocal()Returns the value of thelocalrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Member
Creates an instance of aMemberrecord class.- Parameters:
id- the value for theidrecord componentcoordinator- the value for thecoordinatorrecord componentlocal- the value for thelocalrecord component
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
coordinator
public boolean coordinator()Returns the value of thecoordinatorrecord component.- Returns:
- the value of the
coordinatorrecord component
-
local
public boolean local()Returns the value of thelocalrecord component.- Returns:
- the value of the
localrecord component
-