Record Class TwoPhaseCommitInterceptor.MapEntry
java.lang.Object
java.lang.Record
org.apache.catalina.tribes.group.interceptors.TwoPhaseCommitInterceptor.MapEntry
- Record Components:
msg- the channel messageid- the unique identifiertimestamp- the arrival time
- Enclosing class:
TwoPhaseCommitInterceptor
public static record TwoPhaseCommitInterceptor.MapEntry(ChannelMessage msg, UniqueId id, long timestamp)
extends Record
Entry that holds a message, its ID, and the timestamp of arrival.
-
Constructor Summary
ConstructorsConstructorDescriptionMapEntry(ChannelMessage msg, UniqueId id, long timestamp) Creates an instance of aMapEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanexpired(long now, long expiration) Checks if this entry has expired.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.msg()Returns the value of themsgrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
expired
public boolean expired(long now, long expiration) Checks if this entry has expired.- Parameters:
now- the current timeexpiration- the expiration period- Returns:
- true if expired
-
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. -
msg
-
id
-
timestamp
-