java.lang.Object
java.lang.Record
me.ahoo.cosid.lease.Owner
- Record Components:
key- the logical identity, such as a host or pod name; only for sticky slot choice and observationincarnation- generated by eachLeaseKeeper(each runtime) at start; distinct within one JVM too
Who holds a slot lease (05-machine-lease.md ยง2).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theincarnationrecord component.key()Returns the value of thekeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Owner
Creates an instance of aOwnerrecord class.- Parameters:
key- the value for thekeyrecord componentincarnation- the value for theincarnationrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
incarnation
Returns the value of theincarnationrecord component.- Returns:
- the value of the
incarnationrecord component
-