Package com.yahoo.config.provision
Record Class WireguardKeyWithTimestamp
java.lang.Object
java.lang.Record
com.yahoo.config.provision.WireguardKeyWithTimestamp
- Author:
- gjoranv
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionWireguardKeyWithTimestamp(WireguardKey key, Instant timestamp) Creates an instance of aWireguardKeyWithTimestamprecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static WireguardKeyWithTimestampbooleanhasExpired(com.yahoo.jdisc.Timer timer, ChronoUnit unit) final inthashCode()Returns a hash code value for this object.booleanisDueForRotation(com.yahoo.jdisc.Timer timer, ChronoUnit unit, Random random) key()Returns the value of thekeyrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
KEY_ROTATION_BASE
public static final int KEY_ROTATION_BASE- See Also:
-
KEY_ROTATION_VARIANCE
public static final int KEY_ROTATION_VARIANCE- See Also:
-
KEY_EXPIRY
public static final int KEY_EXPIRY- See Also:
-
-
Constructor Details
-
WireguardKeyWithTimestamp
Creates an instance of aWireguardKeyWithTimestamprecord class.- Parameters:
key- the value for thekeyrecord componenttimestamp- the value for thetimestamprecord component
-
-
Method Details
-
from
-
isDueForRotation
-
hasExpired
-
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
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-