Record Class MembershipProtocol.MembershipEvent.MemberLeft
java.lang.Object
java.lang.Record
com.loomcache.server.cluster.MembershipProtocol.MembershipEvent.MemberLeft
- All Implemented Interfaces:
MembershipProtocol.MembershipEvent
- Enclosing interface:
MembershipProtocol.MembershipEvent
public static record MembershipProtocol.MembershipEvent.MemberLeft(String nodeId, long timestamp, MembershipProtocol.LeaveReason reason)
extends Record
implements MembershipProtocol.MembershipEvent
A member has left the cluster.
- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface MembershipProtocol.MembershipEvent
MembershipProtocol.MembershipEvent.LeaderChanged, MembershipProtocol.MembershipEvent.MemberJoined, MembershipProtocol.MembershipEvent.MemberLeft, MembershipProtocol.MembershipEvent.MemberRecovered, MembershipProtocol.MembershipEvent.MemberSuspected -
Constructor Summary
ConstructorsConstructorDescriptionMemberLeft(String nodeId, long timestamp, MembershipProtocol.LeaveReason reason) Creates an instance of aMemberLeftrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.reason()Returns the value of thereasonrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MemberLeft
Creates an instance of aMemberLeftrecord class.- Parameters:
nodeId- the value for thenodeIdrecord componenttimestamp- the value for thetimestamprecord componentreason- the value for thereasonrecord 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
-
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-