Package com.hazelcast.cp
Record Class CPGroupsSnapshot.GroupInfo
java.lang.Object
java.lang.Record
com.hazelcast.cp.CPGroupsSnapshot.GroupInfo
- Enclosing class:
- CPGroupsSnapshot
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefollowers
record component.final int
hashCode()
Returns a hash code value for this object.leader()
Returns the value of theleader
record component.int
term()
Returns the value of theterm
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
GroupInfo
Creates an instance of aGroupInfo
record class.- Parameters:
leader
- the value for theleader
record componentfollowers
- the value for thefollowers
record componentterm
- the value for theterm
record 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 '=='. -
leader
Returns the value of theleader
record component.- Returns:
- the value of the
leader
record component
-
followers
Returns the value of thefollowers
record component.- Returns:
- the value of the
followers
record component
-
term
public int term()Returns the value of theterm
record component.- Returns:
- the value of the
term
record component
-