Record Class ReliableTopic.ReadResult<T>
java.lang.Object
java.lang.Record
com.loomcache.server.datastructures.ReliableTopic.ReadResult<T>
- Enclosing class:
ReliableTopic<T>
public static record ReliableTopic.ReadResult<T>(List<ReliableTopic.TopicMessage<T>> items, long headSequence, boolean lost)
extends Record
- Since:
- 1.1
-
Constructor Summary
ConstructorsConstructorDescriptionReadResult(List<ReliableTopic.TopicMessage<T>> items, long headSequence, boolean lost) Creates an instance of aReadResultrecord 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 theheadSequencerecord component.items()Returns the value of theitemsrecord component.booleanlost()Returns the value of thelostrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ReadResult
Creates an instance of aReadResultrecord class.- Parameters:
items- the value for theitemsrecord componentheadSequence- the value for theheadSequencerecord componentlost- the value for thelostrecord 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. -
items
Returns the value of theitemsrecord component.- Returns:
- the value of the
itemsrecord component
-
headSequence
public long headSequence()Returns the value of theheadSequencerecord component.- Returns:
- the value of the
headSequencerecord component
-
lost
public boolean lost()Returns the value of thelostrecord component.- Returns:
- the value of the
lostrecord component
-