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
- TheConsistentHash
instance. Note that its ownership information might be incomplete ifmissingUuids()
is not empty.missingUuids
- A collection ofUUID
s 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
UUID
s.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPersistedConsistentHash
(CH consistentHash, Collection<UUID> missingUuids) Creates an instance of aPersistedConsistentHash
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconsistentHash
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Indicates whether there are missing members that were part of the persistent state but are not currently online.Returns the value of themissingUuids
record component.final String
toString()
Returns a string representation of this record class.int
Returns 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 aPersistedConsistentHash
record class.- Parameters:
consistentHash
- the value for theconsistentHash
record componentmissingUuids
- the value for themissingUuids
record 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:
true
if 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 theconsistentHash
record component.- Returns:
- the value of the
consistentHash
record component
-
missingUuids
Returns the value of themissingUuids
record component.- Returns:
- the value of the
missingUuids
record component
-