Record Class LeaseResult
java.lang.Object
java.lang.Record
org.j7m.middleware.examples.workload.LeaseResult
- Record Components:
acquired- whether the lease was acquiredownerId- lease owner identityfencingToken- fencing token assigned to the ownerleaseUntil- lease expiration timestamp
-
Constructor Summary
ConstructorsConstructorDescriptionLeaseResult(boolean acquired, String ownerId, long fencingToken, Instant leaseUntil) Creates a lease result. -
Method Summary
Modifier and TypeMethodDescriptionbooleanacquired()Returns the value of theacquiredrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of thefencingTokenrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theleaseUntilrecord component.ownerId()Returns the value of theownerIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LeaseResult
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
acquired
-
ownerId
-
fencingToken
public long fencingToken()Returns the value of thefencingTokenrecord component.- Returns:
- the value of the
fencingTokenrecord component
-
leaseUntil
Returns the value of theleaseUntilrecord component.- Returns:
- the value of the
leaseUntilrecord component
-