Package com.yahoo.config.provision
Record Class WireguardKeyWithTimestamp
java.lang.Object
java.lang.Record
com.yahoo.config.provision.WireguardKeyWithTimestamp
- Author:
- gjoranv
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Constructor Summary
ConstructorDescriptionWireguardKeyWithTimestamp
(WireguardKey key, Instant timestamp) Creates an instance of aWireguardKeyWithTimestamp
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.static WireguardKeyWithTimestamp
boolean
hasExpired
(com.yahoo.jdisc.Timer timer, ChronoUnit unit) final int
hashCode()
Returns a hash code value for this object.boolean
isDueForRotation
(com.yahoo.jdisc.Timer timer, ChronoUnit unit, Random random) key()
Returns the value of thekey
record component.Returns the value of thetimestamp
record component.final String
toString()
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 aWireguardKeyWithTimestamp
record class.- Parameters:
key
- the value for thekey
record componenttimestamp
- the value for thetimestamp
record 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 thekey
record component.- Returns:
- the value of the
key
record component
-
timestamp
Returns the value of thetimestamp
record component.- Returns:
- the value of the
timestamp
record component
-