Package org.keycloak.cluster.infinispan
Record Class ClockSkewTimestampSample
java.lang.Object
java.lang.Record
org.keycloak.cluster.infinispan.ClockSkewTimestampSample
- Record Components:
nodeName- the name of the node that published this timestamptimestampMillis- the timestamp in milliseconds since epoch (UTC)
@ProtoTypeId(65624)
@Proto
public record ClockSkewTimestampSample(@ProtoField(1) String nodeName, @ProtoField(2) long timestampMillis)
extends Record
Timestamp sample from a cluster node used for clock skew detection.
Each node periodically publishes its current timestamp to the work cache,
allowing other nodes to detect if clocks are significantly ahead.
This supports the cluster-wide clock skew detection mechanism defined in issue #54284. Nodes compare these samples against their local clocks to warn operators when NTP configuration may be incorrect or when clock drift exceeds acceptable thresholds.
- Author:
- Marek Posolda
-
Constructor Summary
ConstructorsConstructorDescriptionClockSkewTimestampSample(String nodeName, long timestampMillis) Creates an instance of aClockSkewTimestampSamplerecord 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.nodeName()Returns the value of thenodeNamerecord component.longReturns the value of thetimestampMillisrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClockSkewTimestampSample
Creates an instance of aClockSkewTimestampSamplerecord class.- Parameters:
nodeName- the value for thenodeNamerecord componenttimestampMillis- the value for thetimestampMillisrecord component
-
-
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 '=='. -
nodeName
Returns the value of thenodeNamerecord component.- Returns:
- the value of the
nodeNamerecord component
-
timestampMillis
@ProtoField(2) public long timestampMillis()Returns the value of thetimestampMillisrecord component.- Returns:
- the value of the
timestampMillisrecord component
-