Record Class MembershipProtocol.MembershipEvent.MemberSuspected
java.lang.Object
java.lang.Record
com.loomcache.server.cluster.MembershipProtocol.MembershipEvent.MemberSuspected
- All Implemented Interfaces:
MembershipProtocol.MembershipEvent
- Enclosing interface:
MembershipProtocol.MembershipEvent
public static record MembershipProtocol.MembershipEvent.MemberSuspected(String nodeId, long timestamp, double suspicionLevel)
extends Record
implements MembershipProtocol.MembershipEvent
A member is suspected to have failed.
- 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
ConstructorsConstructorDescriptionMemberSuspected(String nodeId, long timestamp, double suspicionLevel) Creates an instance of aMemberSuspectedrecord 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.doubleReturns the value of thesuspicionLevelrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MemberSuspected
Creates an instance of aMemberSuspectedrecord class.- Parameters:
nodeId- the value for thenodeIdrecord componenttimestamp- the value for thetimestamprecord componentsuspicionLevel- the value for thesuspicionLevelrecord 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
-
suspicionLevel
public double suspicionLevel()Returns the value of thesuspicionLevelrecord component.- Returns:
- the value of the
suspicionLevelrecord component
-