Record Class TwoPhaseCommitInterceptor.MapEntry
java.lang.Object
java.lang.Record
org.apache.catalina.tribes.group.interceptors.TwoPhaseCommitInterceptor.MapEntry
- Enclosing class:
TwoPhaseCommitInterceptor
public static record TwoPhaseCommitInterceptor.MapEntry(ChannelMessage msg, UniqueId id, long timestamp)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionMapEntry
(ChannelMessage msg, UniqueId id, long timestamp) Creates an instance of aMapEntry
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.boolean
expired
(long now, long expiration) final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.msg()
Returns the value of themsg
record component.long
Returns the value of thetimestamp
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
MapEntry
Creates an instance of aMapEntry
record class.- Parameters:
msg
- the value for themsg
record componentid
- the value for theid
record componenttimestamp
- the value for thetimestamp
record component
-
-
Method Details
-
expired
public boolean expired(long now, long expiration) -
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 '=='. -
msg
Returns the value of themsg
record component.- Returns:
- the value of the
msg
record component
-
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
timestamp
public long timestamp()Returns the value of thetimestamp
record component.- Returns:
- the value of the
timestamp
record component
-