Record Class MemberAttributes
java.lang.Object
java.lang.Record
com.loomcache.server.discovery.MemberAttributes
- Record Components:
attributes- immutable attribute map keyed by stable names such as rack, zone, node, region, and partition-group
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMemberAttributes(Map<String, String> attributes) Creates an instance of aMemberAttributesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.static MemberAttributesempty()final booleanIndicates whether some other object is "equal to" this one.static MemberAttributesfinal inthashCode()Returns a hash code value for this object.booleanisEmpty()merge(MemberAttributes fallback) @Nullable Stringnode()@Nullable String@Nullable Stringrack()@Nullable Stringregion()static MemberAttributestopology(@Nullable String rack, @Nullable String zone, @Nullable String node, @Nullable String region) static MemberAttributestopology(@Nullable String rack, @Nullable String zone, @Nullable String node, @Nullable String region, @Nullable String partitionGroup) final StringtoString()Returns a string representation of this record class.@Nullable Stringzone()
-
Field Details
-
RACK
- See Also:
-
ZONE
- See Also:
-
NODE
- See Also:
-
REGION
- See Also:
-
PARTITION_GROUP
- See Also:
-
-
Constructor Details
-
MemberAttributes
Creates an instance of aMemberAttributesrecord class.- Parameters:
attributes- the value for theattributesrecord component
-
-
Method Details
-
empty
-
from
-
topology
public static MemberAttributes topology(@Nullable String rack, @Nullable String zone, @Nullable String node, @Nullable String region) -
topology
-
isEmpty
public boolean isEmpty() -
rack
-
zone
-
node
-
region
-
partitionGroup
-
merge
-
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). -
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-