Record Class KeyRotation.RotationEvent
java.lang.Object
java.lang.Record
cloud.opencode.base.crypto.rotation.KeyRotation.RotationEvent
- Enclosing class:
KeyRotation<K>
public static record KeyRotation.RotationEvent(String keyId, KeyRotation.RotationEvent.Type type, long version, Instant timestamp)
extends Record
Event triggered during key rotation.
密钥轮换期间触发的事件。
- Since:
- JDK 25, opencode-base-crypto V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRotationEvent(String keyId, KeyRotation.RotationEvent.Type type, long version, Instant timestamp) Creates an instance of aRotationEventrecord class. -
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.keyId()Returns the value of thekeyIdrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.longversion()Returns the value of theversionrecord component.
-
Constructor Details
-
RotationEvent
public RotationEvent(String keyId, KeyRotation.RotationEvent.Type type, long version, Instant timestamp) Creates an instance of aRotationEventrecord class.- Parameters:
keyId- the value for thekeyIdrecord componenttype- the value for thetyperecord componentversion- the value for theversionrecord componenttimestamp- the value for thetimestamprecord component
-
-
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. -
keyId
Returns the value of thekeyIdrecord component.- Returns:
- the value of the
keyIdrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
version
public long version()Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-