Record Class MembershipProtocol.MembershipStats
java.lang.Object
java.lang.Record
com.loomcache.server.cluster.MembershipProtocol.MembershipStats
- Enclosing class:
MembershipProtocol
public static record MembershipProtocol.MembershipStats(long totalJoins, long totalLeaves, long viewVersion, int activeMembers)
extends Record
Membership statistics.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionMembershipStats(long totalJoins, long totalLeaves, long viewVersion, int activeMembers) Creates an instance of aMembershipStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theactiveMembersrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalJoinsrecord component.longReturns the value of thetotalLeavesrecord component.longReturns the value of theviewVersionrecord component.
-
Constructor Details
-
MembershipStats
public MembershipStats(long totalJoins, long totalLeaves, long viewVersion, int activeMembers) Creates an instance of aMembershipStatsrecord class.- Parameters:
totalJoins- the value for thetotalJoinsrecord componenttotalLeaves- the value for thetotalLeavesrecord componentviewVersion- the value for theviewVersionrecord componentactiveMembers- the value for theactiveMembersrecord 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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
totalJoins
public long totalJoins()Returns the value of thetotalJoinsrecord component.- Returns:
- the value of the
totalJoinsrecord component
-
totalLeaves
public long totalLeaves()Returns the value of thetotalLeavesrecord component.- Returns:
- the value of the
totalLeavesrecord component
-
viewVersion
public long viewVersion()Returns the value of theviewVersionrecord component.- Returns:
- the value of the
viewVersionrecord component
-
activeMembers
public int activeMembers()Returns the value of theactiveMembersrecord component.- Returns:
- the value of the
activeMembersrecord component
-