Record Class DistributedMap.WriteMetadata
java.lang.Object
java.lang.Record
com.loomcache.server.datastructures.DistributedMap.WriteMetadata
- Record Components:
timestampMillis- wall-clock write time (System.currentTimeMillis())writerNodeId- deterministic identifier of the node that wrote the value (typicallyclusterId + ":" + nodeId)
- Enclosing class:
DistributedMap<K,V>
public static record DistributedMap.WriteMetadata(long timestampMillis, String writerNodeId)
extends Record
Per-key metadata describing which node/time last wrote the value. Used by
WAN merge paths to break same-millisecond ties deterministically and to
suppress echo loops when the incoming value equals the local value.
-
Constructor Summary
ConstructorsConstructorDescriptionWriteMetadata(long timestampMillis, String writerNodeId) Creates an instance of aWriteMetadatarecord 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.longReturns the value of thetimestampMillisrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thewriterNodeIdrecord component.
-
Constructor Details
-
WriteMetadata
Creates an instance of aWriteMetadatarecord class.- Parameters:
timestampMillis- the value for thetimestampMillisrecord componentwriterNodeId- the value for thewriterNodeIdrecord 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. -
timestampMillis
public long timestampMillis()Returns the value of thetimestampMillisrecord component.- Returns:
- the value of the
timestampMillisrecord component
-
writerNodeId
Returns the value of thewriterNodeIdrecord component.- Returns:
- the value of the
writerNodeIdrecord component
-