Record Class SequencedEvent
java.lang.Object
java.lang.Record
io.umadb.client.SequencedEvent
- Record Components:
position- the sequence number of the event in the event streamevent- the event payloadtrackingInfo- the tracking info recorded when the event was appended; may benullif none was supplied
Represents a single event along with its position in the event stream.
The position indicates the sequence number of the event in the store,
which can be used for ordering, optimistic concurrency, or resuming reads.
-
Constructor Summary
ConstructorsConstructorDescriptionSequencedEvent(long position, Event event) Creates aSequencedEventwithout tracking info.SequencedEvent(long position, Event event, TrackingInfo trackingInfo) Creates an instance of aSequencedEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.event()Returns the value of theeventrecord component.final inthashCode()Returns a hash code value for this object.longposition()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetrackingInforecord component.
-
Constructor Details
-
SequencedEvent
Creates aSequencedEventwithout tracking info.- Parameters:
position- the sequence number of the eventevent- the event payload
-
SequencedEvent
Creates an instance of aSequencedEventrecord class.- Parameters:
position- the value for thepositionrecord componentevent- the value for theeventrecord componenttrackingInfo- the value for thetrackingInforecord 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. -
position
-
event
-
trackingInfo
Returns the value of thetrackingInforecord component.- Returns:
- the value of the
trackingInforecord component
-