Record Class EventEnvelope
java.lang.Object
java.lang.Record
es.urjc.etsii.grafo.events.EventEnvelope
- Record Components:
eventId- dense event id assigned during ordered dispatchtype- event type, normally the payload class simple nametimestamp- wall-clock timestamp when the publisher accepted the event, in millisecondsworkerName- thread that published the eventpayload- event-specific data
-
Constructor Summary
ConstructorsConstructorDescriptionEventEnvelope(int eventId, String type, long timestamp, String workerName, MorkEvent payload) Creates an instance of aEventEnveloperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.inteventId()Returns the value of theeventIdrecord component.final inthashCode()Returns a hash code value for this object.payload()Returns the value of thepayloadrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.Returns the value of theworkerNamerecord component.
-
Constructor Details
-
EventEnvelope
public EventEnvelope(int eventId, String type, long timestamp, String workerName, MorkEvent payload) Creates an instance of aEventEnveloperecord class.- Parameters:
eventId- the value for theeventIdrecord componenttype- the value for thetyperecord componenttimestamp- the value for thetimestamprecord componentworkerName- the value for theworkerNamerecord componentpayload- the value for thepayloadrecord 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. -
eventId
-
type
-
timestamp
-
workerName
Returns the value of theworkerNamerecord component.- Returns:
- the value of the
workerNamerecord component
-
payload
-