Record Class MembershipProtocol.MembershipView.MemberInfo
java.lang.Object
java.lang.Record
com.loomcache.server.cluster.MembershipProtocol.MembershipView.MemberInfo
- Enclosing class:
MembershipProtocol.MembershipView
public static record MembershipProtocol.MembershipView.MemberInfo(String nodeId, String address, MembershipProtocol.MembershipView.MemberState state, long joinedAt, long lastSeen)
extends Record
Information about a cluster member.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionMemberInfo(String nodeId, String address, MembershipProtocol.MembershipView.MemberState state, long joinedAt, long lastSeen) Creates an instance of aMemberInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longjoinedAt()Returns the value of thejoinedAtrecord component.longlastSeen()Returns the value of thelastSeenrecord component.nodeId()Returns the value of thenodeIdrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MemberInfo
public MemberInfo(String nodeId, String address, MembershipProtocol.MembershipView.MemberState state, long joinedAt, long lastSeen) Creates an instance of aMemberInforecord class.- Parameters:
nodeId- the value for thenodeIdrecord componentaddress- the value for theaddressrecord componentstate- the value for thestaterecord componentjoinedAt- the value for thejoinedAtrecord componentlastSeen- the value for thelastSeenrecord component
-
-
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. -
nodeId
Returns the value of thenodeIdrecord component.- Returns:
- the value of the
nodeIdrecord component
-
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
joinedAt
public long joinedAt()Returns the value of thejoinedAtrecord component.- Returns:
- the value of the
joinedAtrecord component
-
lastSeen
public long lastSeen()Returns the value of thelastSeenrecord component.- Returns:
- the value of the
lastSeenrecord component
-