Record Class PersistedConsistentHash<CH extends ConsistentHash>
java.lang.Object
java.lang.Record
org.infinispan.distribution.ch.PersistedConsistentHash<CH>
- Type Parameters:
CH- The specific implementation type of theConsistentHash.- Record Components:
consistentHash- TheConsistentHashinstance. Note that its ownership information might be incomplete ifmissingUuids()is not empty.missingUuids- A collection ofUUIDs representing members that were present in the persistent state but are not currently online.
public record PersistedConsistentHash<CH extends ConsistentHash>(CH extends ConsistentHash consistentHash, Collection<UUID> missingUuids)
extends Record
A record containing the
ConsistentHash restored from persistent state and any missing
UUIDs.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPersistedConsistentHash(CH consistentHash, Collection<UUID> missingUuids) Creates an instance of aPersistedConsistentHashrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconsistentHashrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanIndicates whether there are missing members that were part of the persistent state but are not currently online.Returns the value of themissingUuidsrecord component.final StringtoString()Returns a string representation of this record class.intReturns the total number of members that were present in the persistent state, including those currently marked as missing.
-
Constructor Details
-
PersistedConsistentHash
Creates an instance of aPersistedConsistentHashrecord class.- Parameters:
consistentHash- the value for theconsistentHashrecord componentmissingUuids- the value for themissingUuidsrecord component
-
-
Method Details
-
totalMembers
public int totalMembers()Returns the total number of members that were present in the persistent state, including those currently marked as missing.- Returns:
- The total number of members, including both online and missing members.
-
hasMissingMembers
public boolean hasMissingMembers()Indicates whether there are missing members that were part of the persistent state but are not currently online.- Returns:
trueif themissingUuids()collection is not empty, signifying potential incomplete ownership information in the associatedConsistentHash. Otherwise, returnsfalse.
-
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 withObjects::equals(Object,Object). -
consistentHash
Returns the value of theconsistentHashrecord component.- Returns:
- the value of the
consistentHashrecord component
-
missingUuids
Returns the value of themissingUuidsrecord component.- Returns:
- the value of the
missingUuidsrecord component
-