Package codes.grow.packages.vault
Record Class LeaseRenewal
java.lang.Object
java.lang.Record
codes.grow.packages.vault.LeaseRenewal
- Record Components:
leaseId- lease idleaseDuration- granted TTL (capped by the maximum TTL; seewarnings)renewable- whether it can be renewed againwarnings- server warnings
public record LeaseRenewal(String leaseId, Duration leaseDuration, boolean renewable, List<String> warnings)
extends Record
Result of
LeaseManager.renew(String, Duration).-
Constructor Summary
ConstructorsConstructorDescriptionLeaseRenewal(String leaseId, Duration leaseDuration, boolean renewable, List<String> warnings) Creates the record; the warnings are copied. -
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 theleaseDurationrecord component.leaseId()Returns the value of theleaseIdrecord component.booleanReturns the value of therenewablerecord component.final StringtoString()Returns a string representation of this record class.warnings()Returns the value of thewarningsrecord component.
-
Constructor Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
leaseId
Returns the value of theleaseIdrecord component.- Returns:
- the value of the
leaseIdrecord component
-
leaseDuration
Returns the value of theleaseDurationrecord component.- Returns:
- the value of the
leaseDurationrecord component
-
renewable
public boolean renewable()Returns the value of therenewablerecord component.- Returns:
- the value of the
renewablerecord component
-
warnings
Returns the value of thewarningsrecord component.- Returns:
- the value of the
warningsrecord component
-