Package codes.grow.packages.vault
Record Class RenewalEvent
java.lang.Object
java.lang.Record
codes.grow.packages.vault.RenewalEvent
- Record Components:
leaseId- lease id (""for a token)ttl- granted time to liverenewable- whether it can be renewed againreauthenticated- true when a token renewer logged in again instead of renewingwarnings- server warnings (for example "TTL ... is capped")
public record RenewalEvent(String leaseId, Duration ttl, boolean renewable, boolean reauthenticated, List<String> warnings)
extends Record
Outcome of one successful renewal (or re-login) reported to
RenewalOptions.Builder.onRenew.-
Constructor Summary
ConstructorsConstructorDescriptionRenewalEvent(String leaseId, Duration ttl, boolean renewable, boolean reauthenticated, List<String> warnings) Creates an event; 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.leaseId()Returns the value of theleaseIdrecord component.booleanReturns the value of thereauthenticatedrecord component.booleanReturns the value of therenewablerecord component.final StringtoString()Returns a string representation of this record class.ttl()Returns the value of thettlrecord component.warnings()Returns the value of thewarningsrecord component.
-
Constructor Details
-
RenewalEvent
public RenewalEvent(String leaseId, Duration ttl, boolean renewable, boolean reauthenticated, List<String> warnings) Creates an event; the warnings are copied.- Parameters:
leaseId- lease idttl- granted TTLrenewable- renewable flagreauthenticated- re-login flagwarnings- warnings
-
-
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
-
ttl
Returns the value of thettlrecord component.- Returns:
- the value of the
ttlrecord component
-
renewable
public boolean renewable()Returns the value of therenewablerecord component.- Returns:
- the value of the
renewablerecord component
-
reauthenticated
public boolean reauthenticated()Returns the value of thereauthenticatedrecord component.- Returns:
- the value of the
reauthenticatedrecord component
-
warnings
Returns the value of thewarningsrecord component.- Returns:
- the value of the
warningsrecord component
-