Record Class EventContext
java.lang.Object
java.lang.Record
com.shaft.capture.model.EventContext
- Record Components:
sequence- stable one-based event ordertimestamp- event timestamppage- page contextreplayStatus- replay resultevidence- optional safe evidence referencesextensions- forward-compatible extension data
public record EventContext(long sequence, Instant timestamp, PageContext page, EventContext.ReplayStatus replayStatus, List<EvidenceReference> evidence, Map<String, com.fasterxml.jackson.databind.JsonNode> extensions)
extends Record
Fields shared by every captured event.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionEventContext(long sequence, Instant timestamp, PageContext page, EventContext.ReplayStatus replayStatus, List<EvidenceReference> evidence, Map<String, com.fasterxml.jackson.databind.JsonNode> extensions) Creates immutable common event context. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.evidence()Returns the value of theevidencerecord component.Returns the value of theextensionsrecord component.final inthashCode()Returns a hash code value for this object.page()Returns the value of thepagerecord component.Returns the value of thereplayStatusrecord component.longsequence()Returns the value of thesequencerecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EventContext
public EventContext(long sequence, Instant timestamp, PageContext page, EventContext.ReplayStatus replayStatus, List<EvidenceReference> evidence, Map<String, com.fasterxml.jackson.databind.JsonNode> extensions) Creates immutable common event context.
-
-
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. -
sequence
-
timestamp
-
page
-
replayStatus
Returns the value of thereplayStatusrecord component.- Returns:
- the value of the
replayStatusrecord component
-
evidence
-
extensions
Returns the value of theextensionsrecord component.- Returns:
- the value of the
extensionsrecord component
-